As has been said, he was sitting on one set of tracks when the gate came down. Very hard to tell what track a train is on when it's still down the track aways. He attempted to back up, but we can't see what's behind him, so perhaps the way was not clear. So he tried to get across the tracks so (at worst) his trailer would get nailed instead of him. Probably didn't expect the train to be there quite so quickly.
Much easier for us to sit back and armchair quarterback his decisions/actions. Different story when you're sitting where he was IMO.