Police have said that, as yet, there is no indication of a political or terrorist motive for the attack. The attack occurred around 14:20 (12:20 GMT) as the train was approaching Salez station, between the towns of Buchs and Sennwald.
Several dozen passengers were on board at the time. In a statement (in German), St Gallen cantonal police said video evidence from inside the train showed the attacker, armed with a knife, pouring out a flammable liquid.
Six people - including the attacker - were injured. The seventh injured person was a man on the platform who pulled the burning attacker off the train.
Forensic experts are analysing the flammable liquid and the scene of the crime. Police said the attacker lived in a canton adjoining St Gallen. His address has been searched. On the basis of the video evidence, police say the man acted alone.