That is just south of the Andover station, where there are two crossings right next to each other off an multi-way intersection (Pearson St, and Essex St, meeting Railroad St.) it's possible that the driver was waiting for vehicle traffic to clear when the gates started to come down. Then...