Originally Posted by dcon
IF (BIG IF) you have any room to maneuver, you can turn across the hill a little bit and buy a quick sec to get your foot out.
The easiest thing, I've found, is to be realistic about your climbing ability and select a suitable gear going into the climb. Helps avoid that "oh ****" moment.

+1 on both counts. Cutting across is a great tip... you can even cross back and forth all the way up.
I think riders who are new to hills should practice riding really really slow. A lot of times, on a steep hill, you'll confuse fear of falling over with lack of strength to climb. If you practice riding slowly, you'll be a lot more comfortable at 3 or 4 mph, and can make a more accurate assessment of your situation.
Still, sometimes it's just too steep, and you have to recognize this before you get there.