Souinds like a British crossing. There's supposed to be a fence there. It keeps livestock and pedestrians from wandering onto the track while the crossong is open, then closes off the crossing while the train goes by.
Rry running a train through it and see how it works.