The run-off from Khun Tan Mountain cut through the earth base of the rail route, causing a hole about 50m long and 50m deep.
The incident was reported at about 4am yesterday. The State Railway of Thailand's Lamphun office immediately suspended train services on the route and transferred passengers to neighbouring Lampang by bus.
From Lampang the passengers were transferred to another train to complete their trip to Chiang Mai, Lamphun Governor Surachai Khan-arsa said.
It will take about three days to repair the track.
A road leading to a nearby village also became impassable as a result of a landslide triggered by heavy rains and flash floods, Mr Surachai said.
Flooding has also been reported in other northern and northeastern provinces including Lampang, Chiang Mai, Nakhon Sawan, Tak and Surin.
In Lampang, at least six villages and one school in tambon Chaeson in Muang Pan district were flooded by yesterday's run-off. The floodwater was between 1.5m and two metres deep.
Several roads connecting these communities with other parts of the province were also blocked by landslides.
Low-lying areas in several districts of Chiang Mai province such as Mae Wang, Doi Lo and San Pa Tong were also affected by the floods caused by river overflow.
Although less rainfall has been forecast, the country was still advised to stay alert for more problems arising from lingering downfalls until Monday, especially in Kamphaeng Phet, Kanchanaburi, Suphan Buri, Chanthaburi, Trat, Ranong and Trang, said Somchai Baimuang, deputy director-general of the Meteorological Department.
The Royal Irrigation Department assured it was unlikely there would be another flood crisis this year given the water levels in the major dams including Bhumibol and Sirikit dams.
The two dams were now only about half full after proper drainage carried out previously to prevent the water levels from rising too high as happened around the same time last year, said department director-general Lertviroj Kowattana.
Last year, the dams were about 80% full and needed to release water which consequently led to the flood crisis in the central region and Bangkok.