Bears are a problem for handguns, even big handguns. Their skulls are curved, have lots of cartilage, and tough bone in front of the brain. The rest of the body is heavily muscled. A average handgun, with only 500 foot/lbs of energy and lower speeds don't penetrate and do the necessary damage to kill or stop a bear quick enough to make them effective as an Anti-Bear weapon. On the other hand, a shotgun, loaded with slug or 00 Buck provides a lot of energy that can stop a bear.
Some make the argument that they can place several shots from their .357's, 44 mags, 500 S&W's etc in a bear's skull and stop it. Somehow I think their arguments are just as full of the same stuff they'd find in their pants if they ever were charged by a bear. More and more are opting for Bear Spray due to the sensitivity of a Bear's nose. Bear Spray can definitely give them something else to think about and also takes away the only sense that really works, that of smell. Most bears don't have all that great eyesight.
If you have a shotgun take it with you. Load up with 00 and Slugs in the heaviest load your shotgun will handle.