The key word here is "when" and if you CANNOT get him in the gate, then he isn't worth anything as a barrel horse. I would suggest that you try and figure out why this horse is dreading going in the pen and exerting himself.
Most horses don't just decide to not go in - there is always a reason.
Martha Wright