The security media centre said at least 17 had been injured.
Engine driver K Jayawardene told LBO that he heard a loud explosion and brought the train to a stop.
There was minor damage to the second and third carriages and several people were injured, he said.
The track was also damaged and displaced.
Jayawardene said his train had left Panadura at 6.35 am and the blast had gone off on the track at around 7.15 am.
Police spokesman Ranjith Gunesekera said there was a search on for a man believed to have been involved in the bombing who had run away from the scene.