The train was traveling between the cities of Shulin and Taitung when it left the tracks on a coastal line popular with tourists just before 5 p.m. local time, according to the transport ministry.