Remember how horses learn, they learn by pressure and release of pressure. So if you go into the stall, you're putting pressure on the horse because you're asking the horse to turn and be caught. The horse responds to that pressure by resisting and turning his butt towards you and threatening to kick, so you back off, releasing the pressure and he learns that he did the right thing.
Also, many horses only do things because they feel like doing it, not because you're asking them to do it. So you may saddle a horse up and ride them around and think you're in control the whole time, but really the horse is just letting you do it because it's what he feels like doing. As soon as you ask the horse to do something he doesn't really want to do like walk past a scary bush or go back to the arena when he was facing towards the stables, that's the point you get bucked off because you're not in control. He is, and he's going to put you in your place like he would to a disobedient foal.
It sounds like you don't know a whole lot about horse behavior, but is it something you're interested in? You could just have a trainer work with you all the time and just ride for pleasure, but if you want to be a leader to your horse and know how to handle difficult situations when they come up, it's best to do a lot of research into horse behavior and learn how horses respond to eachother in a herd, because that is only how horses think of people. Your horse doesn't think of you as a human who leads him around, your horse thinks of you as another horse. You want to be the alpha horse among your horses, but right now you are the foal and you are the one getting pushed around.