A court heard David Fairweather, 58, “had a momentary lapse of concentration” and drove into the barrier on Station Lane, Featherstone, as a train was approaching.
Fairweather, a driver for Pontefract-based BL Travel coach firm, was driving his 15-seater minibus at 10 miles an hour at the time of the incident.
Martin Robertshaw, prosecuting, said the barrier was coming down, the lights were flashing and sirens were sounding when Fairweather struck it.
He added: “For some strange reason the bus proceed to go towards that crossing and collided with the barrier as it was coming down.”
The barrier became detached in the collision but fortunately it did not go onto the railway line and there was no danger to the oncoming train.
Fairweather stayed at the scene and contacted police but was later charged with dangerous driving.
The court heard there was no evidence that Fairweather had been distracted or using a mobile phone at the time of the incident.
He pleaded guilty to dangerous driving.
Derek Hillas, mitigating, said Fairweather, of Newtown Avenue, Cudworth, Barnsley, had been a competent professional driver for many years and had no previous convictions.
He said: “He is a man of good character with an exemplary driving record who will lose his job as a result of his conviction.”
Describing the offence, Mr Hillas said: “Clearly for some inexplicable reason he had not noticed that the barrier was coming down.
“Human beings do have momentary loses of concentration.”
After hearing the mitigation, Recorder David Gordon told the court he was prepared to impose a suspended prison sentence and order Fairweather to do 160 hours unpaid work.
But Mr Hillas said Fairweather would refuse to carry out unpaid work as his client needed to find paid employment as he had lost his driving job.
Recorder Gordon said he had no alternative but to send Fairweather immediately to custody. He said: “The reason you have given is not a reason at all - it is an excuse.”
Describing the offence, he said: “These are just the kind of situations which have ended with disastrous circumstances.”
Fairweather was jailed for 12 months and banned from driving for three years.