Seven riders in the peloton crossed with the safety barrier down, but were not sanctioned for breaking race rules.
Sir Bradley Wiggins finished 18th in his final race for Team Sky, 31 seconds behind German winner John Degenkolb.
"It's the most beautiful race in the world and we get bothered by a train," said French champion Arnaud Demare.
"This needs to be taken care of, it was dangerous. We went through but it was close."
One rider from the Belgian Lotto team was clipped by a barrier which came down seconds before the 60kph train sped past.
Race organisers said the peloton were 10m from the barrier as it started to descend and that the leading riders "could not stop in safe conditions".
A police motorcycle stopped the rest of the pack, before organisers of the 151-mile race slowed the leaders to allow the pack to catch up.
Former British champion and Olympic track medallist Rob Hayles, commentating on BBC Radio 5 live sports extra, said: "That could have ended in disaster.
"You could see riders nip across but that train wasn't slowing down."
A similar incident occurred last year but it affected only the eight men in the breakaway.
In 2006, three riders who were chasing a lone breakaway by eventual winner Fabian Cancellara were disqualified after crossing a railway line after the barrier was down.

The 20-year-old follows Danny Ward from Anfield to the Scottish Premiership, the goalkeeper having been with the Dons since the start of the season.
Aberdeen manager Derek McInnes told the club website: "He's a player who has always impressed us and will give us good options in the months ahead."
The Northern Ireland international joined Liverpool from Glenavon aged 16.
He has yet to make his competitive debut for the Premier League side but made nine appearances while on loan to Barnsley in the Championship in the second half of the 2013-14 season.
That led to the first of three international caps and his only senior appearance last season was in a 1-0 friendly defeat by Scotland.
"Ryan has the quality needed to play with us at Aberdeen and we are looking forward to working closely with him," added McInnes.
"Ryan's eagerness to join us over others also give us great encouragement."
McLaughlin's older brother, Conor, is also a right-back, with League One club Fleetwood Town, and has six Northern Ireland caps.
Several Paris-Roubaix riders were seconds from being hit by a train as they raced over a rail crossing while a TGV approached.
[NEXT_CONCEPT]
Liverpool right-back Ryan McLaughlin has joined Aberdeen on loan until January.