You need to gain is focus on you. Work with him everyday. Have him bond to you. Seperate him from any horses he may be with for a week or two and get him to really bond to you. Then work him through this. If his main thing is wanting to go out the gate...make him do some turns or sidepasses,backing by the gate...just get his mind off getting out the gate and focus it on you. Then, when he relaxes and starts to drop his head and give in, make sure you stop and reward him. You need to make sure he knows what you are asking of him and what you want. So, when hes doing it wrong make it hard for him(work him,back,do transitions ect) and when hes doing it right, make that really easy for him, give him praise. Just some ideas