Some horses are more bothered by gunshots than others. Like anything else they just have to get used to it. I have never had one buck or anything, but we have a few that you better be holding onto when you shoot or have them tied or you will be walking back to camp. Most of them know what is going on as soon as you pull the gun out and they aren't bothered at all. We have a couple we have used for a long time that actually get excited in anticipation when you chamber around just like a hunting dog does.
Really I have seen more issues result from the blood and dead animals than gunshots. Some of our horses have required zero training of any kind they just naturally aren't bothered, and we have one of our best horses that goes completely mad when he smells blood. So much so that we don't even take him hunting anymore. He is an exceptional trail horse, he will go anywhere you point him, you can put any level of rider on him and he will go all day, but take him anywhere near a dead animal or blood and he goes nuts. We even fed him for about three months on an old bloody cow hide, and he still went berserk on the next hunt.