What breed is he? How old is he? Whats his background?
My mare had a habit of flipping over backwards while being led. Or just standing there. Or being tied to the wall. Mainly tied to the wall. Though this one time she was ground tied andmy sister was picking out her feet, and all of a sudden the horse flips over backwards. The look on my sister's face was "Where'd the horse go?!"
"Behind you, on the ground."
She was completely random with it. The last straw was when she was tied to the wall and I go to walk around her. She rears, snaps her halter, flies overbackwards and almost cathes me between herself and the wall. She rolled onto my saddle and got up. I caught her and laid into her. I had been patient enough with the whole ordeal and she just didn't give a rat's hindend. I had everyone looking at me at the barn while I laid into her, but I didn't care. She could have really hurt me.
After that I tied her to the wall and she hasn't flipped over since.
I don't know what caused her to flip. I do know that she was amish trained and she has scars all over her face and nose, so maybe that has something to do with it.
Your gelding may be testing you. If he's fine one day and not another, I'd correc the stubborn behavior when it comes up like he should know better, because he does know better, he just choses not to care that day.
On another note, the stiffness in his legs might be due to arthritus. Not quite sure what his issue with the halter is though without more information.