Wildlife photographers have a saying..."only food runs". The big thing is to stay calm, stay put and try to enjoy the experience. It is most likely that the bear will take off at the sight of you but in case it doesn't I would recommend staying put or moving SLOWLY in the same direction you were going angling away from the bear. Give it an escape route and it will likely take it. If it feels as if you are pressing it or cornering it, the possibility is there it may charge and even if it is a bluff...you horse may not think so!
There are few instances where a bear attacked a group of people on food numbering four or more, even sows with cubs. Anytime we go into an area that is bear infested (certain lakes in the Yellowstone high country during cutthroat spawning season) we try to go in groups of four or more. Confronted by such overwhelming odds a bear will typically skedaddle as opposed to fight it out. The biggest risk you run in bear country is two fold...getting bucked off if your horse freaks at the sight of a bear and bears coming into camp, especially if you don't keep a clean camp.
The only caveat to the above is if you are unlucky enough to stumble really close to a bear on a kill. Then all bets are off. I would ride as steady and well trained a mount as possible that I know I can handle if things go south and keep my eyes and ears peeled. Being alert and staying in groups, especially in thick cover is your best defense. I could tell stories about all kinds of wildlife encounters both on horse and off after 20+ years as a wildlife photographer and hunting guide.