The state railway Rete Ferroviaria Italiana (Rfi) confirmed the deaths of the workers, aged between 22 and 52, on Thursday, while Brandizzo mayor Paolo Bodoni said an investigation is underway.
The workers were replacing some track outside the station of Brandizzo, on the line connecting Milan and Turin, at about midnight on Wednesday when they were run over by a train transporting wagons.
The leader of Italy’s second largest trades union Cisl, Luigi Sbarra, said the deaths were “outrageous” and the union has been left “dismayed”.
“The terrible accident that occurred last night on the Turin-Milan railway line leaves us dismayed,” said Sbarra on social media.
“Five workers are dead, five families - to whom we send our condolences - have been destroyed by the lack of safety measures,” he continued.
“This umpteenth tragedy is an outrage to all Italian workers,” concluded Sbarra.
The train was travelling at about 160 kph (100 mph), news agency ANSA quoted police as saying.
“Rfi expresses great sorrow ... and offers its condolences and closeness to the families of the dead workers,” the company said in a statement.
Two workers managed to avoid the goods train and were unhurt, ANSA reported.
The train driver was treated for shock on the scene and then allowed to go home.
Mr Bodoni told the AGI news service than an emergency worker had described to him a “chilling scene, with human remains across 300 metres”.
“It’s a huge tragedy,” he said.
“It cannot be excluded that there could have been a communication error,” he said.