Louis Lacy caused £10,000 damage after crashing through barriers on both sides of the crossing on Leeds Road at Cutsyke before one barrier became wrapped around a car queuing on the opposite side of the crossing.
A Judge jailed Lacy for 14 months after the court heard a train was expected at the crossing on Leeds Road at Cutsyke and the "terrible"dangerous driving could have led to many deaths.
Prosecutor, Louise Pryke said police had been looking for uninsured driver Lacy in Castleford at around 8pm on June 28.
Lacy was spotted on Beancroft Road in the Honda with his girlfriend in the front passenger seat and her three-year-old son, who was not wearing a seat belt, on the back seat.
An unmarked police car was travelling in the opposite direction on the narrow street and Lacy drove up and over the near side wing of the police car before crashing into a parked car.
Miss Pryke said Lacy drove off at speed along Beancroft Road and overtook a car on a blind bend on the wrong side of the road.
The court heard Lacy sped towards the level crossing on Leeds Road at Cutsyke and crashed through the closed barrier before driving over the rail tracks and crashing through the second closed barrier.
The second barrier became wrapped around a car being driven by a woman with two of her children as passengers and a third child passenger.
Miss Pryke said: "Both cars must have become entangled because she described him revving to get away."
The court heard the woman and her two children were badly psychologically affected by the incident.
Lacy's car was found abandoned on Altofts Lane at Castleford.
Lacy, of North Street, Castleford admitted dangerous driving, driving without insurance and without a licence.
A probation officer told the court Lacy, who has no previous convictions, was a heavy cocaine user at the time of the incident, adding: "He is extremely remorseful for his actions."
Jessica Mae Randell, mitigating, said father-of-one Lacy suffers from depression and anxiety and has self-harmed following the incident, adding: "He is unable to cope with the guilt of what might have been."
Miss Mae Randell said: "He is a caring individual who dotes on the children in his family. He has seven nephews and nieces."
Miss Mae Randell said: "They (Lacy and his girlfriend) are together and has forgiven him for this incident."
Jailing Lacy for 14 months, Recorder Andrew Dallas told him: "You must accept what you did was a terrible terrible case of dangerous driving and it could have led to the deaths of many people."
Lacy was banned from driving for 31 months.