I had to do some research on this one. First let's start by saying that capacity crowds are extremely rare. While nothing is guaranteed and unanticipated crowd convergences could happen any time, typically the only days of the year that you might anticipate full capacity crowds are July 4 and December 24, 25, and 31. And this doesn't even happen every year.
When crowd control does happen, it occurs in phases. This is described very well by Moms Panelist Bret
here. In the rare instance when there is a Stage 4 crowd control in place, that means that no new guests will be able to enter the park. That means no guests, not annual passholders, not DVC members, not people with dining reservations. If Stage 4 is in place, the park is at it's full legal by-order-of-the-fire-marshall limit. In this situation, you would be unable to go to your dinner. Should your meal be one that requires a credit card deposit (Cinderella's Royal Table for example), you should call Disney Dining at 407-WDW-DINE as soon as possible and explain the situation. Again, there are no guarantees, but my understanding is that in this rare situation Disney does often give refunds on the deposit.
My advice to you would be if being in a certain park or dining at a certain restaurant on a holiday is a priority for you, plan to be there as far in advance as possible.