Whatever you can shoot well, and is reasonably powerful. We hear the rare stories about the super powered guns that didnt stop a bear right off, and are led to believe the bears are somehow endowed with supernatural powers. We also seem to hear a lot from folks that don't live anywhere near bears, have never likely seen one even in a zoo, about what it takes to kill one.
A guy was attacked last year in Wy by a sow grizzly (about 300 lbs) with 2 cubs. He killed her with a 41 mag Ruger SA with 210 gr factory loads. He got complete penetration with exits on the 2 hits he got. Killed her DRT.
Ralph _______? lived in northen BC in the first part of the 1900's He said in his book Crusoe of Lonesome Lake that he quit counting at 50 the grizzlies he killed, with a Winchester 94 carbine and a Remington 35 cal rifle. Not saying they'd be the best choice in weapons for bear killing, but they seemed to work, and not just being lucky once or twice. Just want to point out that shooting well is more important than a super powered gun.
I was talking with another guy that has had experience with grizzlies. I mentioned my 45-70. He said "It's a nice gun, but you don't really need anything that big". I asked what he used, he said "a 30-30, they aren't that hard to kill".
The attack in Mt near Yellowstone had 1 fatality and 2 injuries. They caught the bears, a 3-400 lb sow grizzly with 3 cubs. They had been feeding on the guy that was killed. It was confirmed by DNA. The sow was killed, the cubs will live in a zoo somewhere. Bear spray is fine stuff for many circumstances, but being IN a tent when trying to use it will seriously limit its usefulness.
FWIW, I generally carry a 44 Smith with medium to Keith level loads(slightly under factory level), or a Ruger SA in 45 Colt cal with 325 gr loads at moderate high vel, and a 348 Winchester w/ 250 gr loads, a 45-70 w/ 400 gr loads @ 1850 fps, or 30-06 w/ 180's. I'm not a bear slayer, nor do I portray one on TV.