This exact scenario actually occurred at St. Vincent's (New York) last year, when the hospital permanently closed it's doors. It unfortunately did so before the end of the academic year, so every current resident/fellow lost their job before the year was up. And of course, a large number of incoming residents and fellows lost their spots. I know a few of the people who ended up in this position.
If you are a current fellow/resident, then the program has some obligation to help you out. If you haven't started yet, you're sort of on your own. In reality, the hospital tried to help people find spots (usually successfully), but if a program has closed down, they probably don't have the resources to help too much. A better resource is your current program, which can help more.
You're in a better position if you've already started fellowship, as you can transfer to another program with greater ease. They are allowed to take people above their allotted slots (which happened to all of residents affected by Hurricane Katrina), so if a program likes you, they can take you. If you haven't started yet, it's more difficult for a program to find a spot for you. If your fellowship is in something competitive (say, Cardiology), then it makes matters difficult.
I wouldn't recommend worrying too much about this. The likelihood of this happening is relatively low.
Cheers!