(1) When a person driving a vehicle approaches a railroad grade crossing under any of the following circumstances, the driver shall stop the vehicle not more than 50 feet but not less than 15 feet from the nearest rail of the railroad, and shall not proceed until the driver can do so safely:
  (a) A clearly visible electric or mechanical signal device gives warning of the immediate approach of a railroad train or other on-track equipment.
  (b) A crossing gate is lowered or a flagman gives or continues to give a signal of the approach or passage of a railroad train or other on-track equipment.
  (c) A railroad train or other on-track equipment approaching within approximately 1,500 feet of the highway crossing gives a signal audible from that distance, and the railroad train or on-track equipment by reason of its speed or nearness to the crossing is an immediate hazard.
  (d) An approaching railroad train or other on-track equipment is plainly visible and is in hazardous proximity to the crossing.
  (2) A person shall not drive a vehicle through, around, or under a crossing gate or barrier at a railroad crossing while the gate or barrier is closed or is being opened or closed or against the direction of a police officer.
  (3) A person who violates this section is responsible for a civil infraction.