The answer depends on the rule about what a driver follows at a railroad crossing: the crossing attendant's instructions, the traffic lights, signs and road markings for the crossing, and the position of the gate. These requirements work together and don't replace one another: a stop signal from the attendant or the traffic light, or a closing gate, bans entry even if everything else seems to allow it