Bernard Mortelier, 54, was knifed eight times in the head, abdomen, side and arms,when he told a passenger who was travelling without a ticket that he would be penalised, the state rail operator SNCF said.
Mortelier was flown by helicopter to hospital and was “hovering between life and death”, an SNCF spokesman said.
He later underwent “surgical intervention” for his wounds and was described to be in “stable” condition, according to medics.
The attacker, travelling on a train between the cities of Lyon and Strasbourg, was “unbalanced”, the SNCF said, adding that he was in police custody.
An investigation has been launched.
The man was not formally named but a source close to the case said he was a 27-year-old from the eastern city of Mulhouse who had been convicted four times for violence.
“In a spontaneous movement of solidarity with the attacked ticket collector,” his colleagues in the east and southeast launched a strike, Michel Mann, a regional head of the influential CGT union told AFP.
The strike will continue until Friday afternoon and has hit services.
Eighty percent of trains in Alsace and 70 percent of trains in Lorraine were cancelled. All night trains in the two northeastern regions were cancelled.
The interior ministry said thousands of passengers were stranded in railway stations across the country. There are about 11,000 ticket collectors working for the French rail network.
SNCF chief Guillaume Pepy condemned what he termed an “odious act” and travelled to the hospital in the eastern city of Besancon where Mortelier was being treated.
He urged the strikers not to “punish travellers simply because a dangerous madman attacked a ticket collector”.
The last two incidents where rail ticket collectors were knifed occurred in July 2004 and in February 1999.