Guns and hiking? Might be really naive question, but is that necessary?
No, it isn't. Plenty of people go hiking without a gun, and even without pepper spray. Avoiding negative wildlife encounters is mostly about using your brain and paying attention to your surroundings, and most people who carry protection will never need it. Of course, I've never needed the fire extinguisher under the kitchen sink, either. Or my avy beacon, for that matter. Personally I'd rather have it and hope I never need it. I know plenty of people who have had to shoot bears in self-defense, including my fiance's friend, who would have been killed this spring if he hadn't been carrying.
We haven't beaten our wilderness into submission yet, like many other parts of the developed world (and indeed most of Alaska isn't "developed" in the same way that Europe and the Lower-48 are). The primary concern is bears, both brown and black, both of which are very common here (even in town), but there is also the potential for negative encounters with moose, wolves, and other critters. Don't take that as a reason not to come here for a visit. In my opinion, the fact that this place is still wild is the reason you should
come. Educate yourself about wildlife safety, and keep your brain with you at all times, and you will almost certainly be fine. Whether you carry a defensive weapon or not won't make a difference 99.9% of the time, but if you do want that extra margin of safety in case of an emergency, you can carry pepper spray, which is much easier and safer to deploy for people with little experience with guns.