You must stop at a railroad crossing when:

You must stop at a railroad crossing when directed to do so by a flagger or stop sign. Stop when flashing red signals and gates are present and operating.
DMV Writen Test