The incident happened at Khao Thamon railway station in Phetburi province at 10.35 am today.
The locomotive and five rail cars derailed and blocked the tracks after the impact.
The truck was carrying a number of cattle while it was crossing the manned railway crossing and ignoring the stop sign.
More than 30 passengers were also injured in the crash within two days after the oil train derailment in Lamphun province.
Witnesses said the truck driver violated the traffic light at the manned railway crossing and drove the truck across the crossing while the south-bound train was coming.
The incident forced the railway officials to stop two south-bound trains from Bangkok at Cha-am railway station and transfer all passengers by buses to Phetchaburi to continue their journey to Lang Suan in Chumphon.
All the injured passengers were admitted to hospitals in Phetchaburi and Cha-am.
Five died at the scene, including the truck driver.