Both of the above posts are correct. So-called bear spray is like spanking your enemy to teach him a lesson.
Hand guns are effective in bear country. Just carry a large enough caliber and practice shooting it to become at least some what profecient before headingout.
I would recommend .357 mag or larger. preferably larger. I carry a .44 mag w/3" barrel for handiness and the security. It feels good to know you can protect yourself.
As far as traveling to and from the trailhead you need to get "the real lowdown" from an expert whoever that may be.
As a sidebar, his bigger worry would be the Big Cats. Their populations are rapidly growing and they present a much larger concern to most woods people than bears. Grizzlys aside. Best of luck in your search.
Would 45 ACP do the Job? I carry a Springfield XD 45 Service model when Camping. Is it large enough or am I fooling myself???