Yes, you can bring in most types of hunting rifles and shotguns into Canada for protection from animals in the wilderness provided you take care of the proper paperwork for importation, transportation and licensing http://www.cfc-ccaf.gc.ca/info_for-renseignement/factsheets/visitin_e.asp . In fact, hunting, including bear hunting, draws a lot of American visitors to Canada.
As far as carrying a restricted handgun or some sort of prohibited weapon (automatics, bazookas, Howitzers, A-bombs, etc) for personal protection against bears, you will not be allowed to bring one over the border or to carry one in Canada. (Before someone starts nitpicking, yes, a handgun can be brought in and transported if it is for a target competition).
As far as black bears go, there is no need for a gun for protection. Black bear attacks are extremely rare (only about 40 in the last century in all of North America http://bears.mnr.gov.on.ca/gen_recognize.html – mostly rogue bears), whereas gun accidents are not nearly as rare, so if you are serious about keeping safe, leave your gun at home. Similarly, if you want to avoid needless weight when hiking or portaging, leave the gun at home, and if you want to avoid ugly American comments, leave the gun at home unless it is hunting season.
If you do have a close encounter with a black bear (I’ve had lots http://my.tbaytel.net/culpeper/LowerJamesBayPicsMooseRiver.html ), just back away in a direction that does not block its avenue of escape. If you are in your tent at the time, just tell it to fuck off. If it hangs about, once it is gone you should try to figure out why it found your site so interesting, and correct your practices. Obviously keep your camp and gear spotless, do any gutting or food prep well away from where you tent and gear is, and hang your packs.
There are areas of Canada where different types of bears hunt people (e.g. polar bears along the arctic ocean), or defensively attack people (griz in the west), in which case the preferred gun is a honking big shotgun loaded with slugs, along with other forms of protection for advanced warning and deterrence.
Have fun with your trip, and be sure to post a trip report for us!