Nearly a hundred years later, though the Indian Railways have long discontinued the third class compartments, the problems rail travellers face are much the same as what Gandhi experienced.
The railway carriage was packed and in the compartment that had a capacity of nine, 12 passengers were already crammed in. But for a friend's help, the frail Mohandas Karamchand Gandhi would not even have been able to secure a seat for himself.
Just then, a railway employee swore at a commuter, threatening to strike him and then shut the door in the faces of passengers who he had difficulty squeezing in. Such was the state on a mail train from Madras (now Chennai) to Bombay (Mumbai), back in 1917.
The incident and many such incidents that spoke of the travails of travelling by train in India were narrated by Gandhi in his article, Third Class in Indian Railways. Nearly a hundred years later, though the Indian Railways have long discontinued the third class compartments, the problems rail travellers face are much the same as what Gandhi experienced.
Even today, on crowded railway routes, "the boarding of unreserved coaches is policed by constables with laathis," says economist Jean Dreze whose work with tribal people in some of the remotest villages of India requires him to often make the journey by train.
"It is a pathetic sight to see people being herded like cattle into coaches that are already jam-packed," he says in a response emailed to Business Standard just as he is about to board a train. Has anything changed? He doesn't think so.
"The lesser mortal who travels without reservation is exactly where she was 35 years ago: she has to queue for up to an hour in agonising heat to buy a ticket, there is no functional board to tell her where or when the train is likely to arrive, the enquiry counter is jammed, and, more often than not, the train is so packed that boarding it is a feat of acrobatics," he says.
Gandhi, it is well-known, always chose to travel third class to identify with the poor rather than make the journey in suites or salons that defined first-class rail travel back then.
Comparing the conditions, while on a journey from Bombay to Madras, he wrote in September 1917: "The first class fare is over five times as much as the third class fare. Does the third class passenger get one-fifth, even one-tenth, of the comforts of his first class fellow?"
Anybody who has travelled on an unreserved ticket on Chennai Mail in the present day will tell you how that disturbing observation holds true today - both in terms of the gap in fare structure and the quality of travel
. An unreserved ticket on Chennai Mail today costs about Rs 315, while air-conditioned (AC) three-tier is more than three times higher at Rs 1,130 and AC two-tier berth is over five times higher at Rs 1,795.
It's not as though the Railways haven't moved towards progress at all.
A railway official lists the measures taken for unreserved ticket travellers like introducing Jansadharan special trains, which are long-distance unreserved trains, and providing four to six coaches in mail and express trains for unreserved travel.
To ease queues at ticket counters, registered agents have also been allowed to set up Yatri Ticket Suvidha Kendra outside railway stations.
But these measures have fallen short of the requirement. Passenger traffic has shot up but the corresponding increase in the number of unreserved coaches has been only marginal, even as numerous priority trains have been launched.
"If the focus was on the convenience of ordinary passengers rather than national prestige of running bullet trains at the cost of Rs 60,000 crore or Rs 600 billion per train, big improvements would be possible within a few weeks," says Dreze.
The chaotic rail travel in India, however, does have one positive. "Culturally, it is the best way to know the country and experience its people," says Veer Singh, founder of Vana Retreats, who was once an avid train traveller.
Gandhi too had written about this "exceptional assortment of passengers" on his return journey from Madras when he said that among his his co-passengers "there were Mahomedans, two refined Tamilians and two Mahomedan merchants".
Singh, whose father is Analjit Singh of Max, used to travel by train often when he was in his early 20s because, he says, he wanted to reduce his carbon footprint. That was also the time when he stopped using air-conditioning at home and led a frugal life.
"I used to travel by sleeper class and once also travelled in the second class," he says. "During the journey, one has to guard one's seat. If you even get up to use the toilet, there will be many other passengers waiting to grab your seat," he recounts.
Even now, whenever he gets an opportunity, he likes to travel by train - but in Europe, not India. In India, he says, rail travel is tiring and inefficient.
Besides, he adds, his work and lifestyle have altered in a way that makes train travel inconvenient.
Often, the railway staff too proves to be unhelpful. Singh recalls a journey he undertook between Puri and Kolkata.
He had got the date of the journey wrong, but when he tried explaining this to the ticket collector, he was asked to pay a bribe even though a lot of berths were empty.
"I refused to pay the bribe and ended up travelling in the space between the toilet and the compartment," he recalls.
Back in time, one of Gandhi's co-travellers, too, sat through the day at the Central station at Madras watching passengers pay bribes to procure their tickets.
"Another said he had to pay Rs 5 before he could get his tickets and his seat," wrote Gandhi. Singh, who sees no harm in subsidising fares for lower classes and increasing it for higher classes, doubts if the problem is a result of lack of resources.
"There is a lack of application of mind and technology," he says.
"I am not for privatisation, but the it is too large an organisation for the government to manage and, therefore, it is riddled with corruption like any other government undertaking of its size."
Though railway is the cheapest mode of long-distance travel - cheaper even than road travel on some sub-urban routes - it is widely believed that commuters will be ready to pay more if services are improved.
But while train travel is affordable for people of almost all strata of society, "the system is absolutely appalling", says Singh.
"The smell, dirt and corruption can be dealt with by putting in just a little more effort."
Gandhi, who was a stickler for cleanliness, was understandably appalled by the dirty conditions of the trains.
He wrote: "They (passengers) squat on dirty floors and eat dirty food. They are permitted to throw the leavings of their food and spit where they like, sit how they like and smoke everywhere… Is it any wonder that the plague has become endemic in India?
Any other result is impossible where passengers always leave some dirt where they go and take more on leaving." Much has changed since.
The Rajdhanis and the Shatabdis have good facilities and even the ordinary train compartments might no longer be as "evil looking" as Gandhi once put it.
Trains run faster, passengers have access to on-board catering and bedding, there are plug points for charging the mobile phone and Wi-Fi Internet is available at some stations. But much of the government's focus continues to be on making travel better for the khas aadmi. Unreserved travel, as Dreze sums up, remains "a relentless nightmare".