Whatever you choose, make sure you file off the front sight. That way, when the bear shoves it up your ass before he eats you, it won't hurt as bad!
Seriously - I wouldn't take ANYTHING less than a .44Mag revolver, with HEAVY loads (like Buffalo Bore type stuff...).
That being said, the best thing I've found is a 12-gauge w/extended magazine tube. First shot is bird-shot (it's effective at scaring 'em away), and everything after it is high-performance slugs.
I've used the birdshot 2 times - and it worked both - on Kodiak brownies.
Just remember that carrying a gun - any gun - doesn't replace common sense and knowing what is in your surroundings at ALL times! Keep a cool head and you'll be ok. Also remember that, if you are charged, you will likely only get one shot before the bear is on you - and you damn well better make it count!