After a train clears a crossing that has flashing signals, drivers may proceed only after the lights have stopped flashing and no second train is coming on another track.

At a railroad crossing, a driver may proceed only after the gate is all the way up, the lights are no longer flashing, or the flagger has signaled traffic to proceed. A driver should visually check all the tracks for any additional oncoming trains or railroad equipment before proceeding.
DMV Writen Test