Early on in this book, Matthew Engel is shuttling about in the West Country on a two-week Rail Rover ticket when he finds himself approaching Bristol on a train unglamorous even by British standards - namely, an overcrowded, dirty Class 143 Pacer ("all the Pacers are to a greater or lesser degree buses adapted for use on rails"). One of his fellow passengers, instinctively attuned to the line, calls out "Something's going to go wrong in a minute", and sure enough, Engel recounts, "we squealed to a halt outside Bristol Temple Meads and spent five minutes waiting for a platform".

I thought at first that this was going to be a very personal account of Britain's railways, like Parallel Lines, in which Ian Marchant distinguished between the railway of reality and the railway of romance. The former, he averred, was "largely shit", a sentiment Engel echoes: "I love trains. I hate trains." But in fact Eleven Minutes Late resolves itself into a chronologically ordered account of the "two centuries of fiasco" that comprise our railway history. Christian Wolmar supplied the same thing recently in Fire and Steam, but Engel is primarily a humorous writer, and we end up with a railway history that is both salutary and funny - a complementary volume to Wolmar's, rather than a direct rival.

Not that you have to be a comic genius to find dark farce in our railway history. As a nation we had the engineering flair to pioneer railways, but lacked the political will to fund or manage them successfully, so that most of us practise what Engel calls "defensive travelling". We leave an hour earlier than ought to be necessary. Engel's title, by the way, comes from David Nobbs's series of books featuring the put-upon commuter Reggie Perrin. In the first of these, Reggie writes to the traffic manager of British Rail Southern Region, complaining that his train always arrives 11 minutes late. "Why don't you re-time your trains to arrive 11 minutes later? Then they would be on time every morning." (That, Engel says, is exactly what the privatised operators have done.)

Our railways were always chaotic. For half a century, we had two track gauges: the 4ft 8½in of George Stephenson and the 7ft of Brunel. Engel observes: "The point about the gauge - and this is hardly an abstruse technicality - is that it does not matter much which you choose as long as the whole network has the same one." He relishes some of the more gothic aspects of Victorian train travel: the frequent crashes (or "smashes", as they were enthusiastically known), and the lack of corridors in carriages that trapped passengers in their compartments, sometimes with undesirable companions.

The railways were run into the ground during the first world war, and many of the returning soldiers had, ominously, learned to drive and maintain lorries. In 1923, the myriad companies were amalgamated into the "Big Four", but these were heavily regulated by the government. They were, Engel says, "like tethered giants perpetually being taunted by the Lilliputian upstarts who had the freedom of the open road". In response, they concentrated on marketing and PR. The bar on the Flying Scotsman, operated by the London and North Eastern Railway, offered 32 cocktails.

Nationalisation occurred in 1948 because, Engel writes, "it was an idea whose time had come", but "the government didn't have the faintest idea how it would play with its new train set". A series of inept and contradictory interventions followed, and then came Dr Beeching with his "sinister toothbrush moustache" and his axe. As chairman of British Rail in the early 1960s, he pruned thousands of miles from the network. Railway enthusiasts have been sticking pins into his image ever since, but Engel focuses on his political master, the Conservative transport minister Ernest Marples, "with his un-British addiction to publicity and a look and manner rather like Hughie Green, the host of the TV show Double Your Money". Marples was rumoured to have financial interests in the building of roads. Engel doesn't quite go along with that, but finds it telling that he died in Monte Carlo: "you can't get more exotic and dodgy than that".

No one has ever claimed the "credit" for the next brainwave, privatisation, but Engel presents a short, disturbing interview with the man nominally responsible, John Major, who comes across as a sort of dazed observer of the process that prompted, according to Engel, the creation of at least 148 acronyms: "Welcome to the world of ORR, OPRAF, ORCAT, ROSCOs, RIDDOR, TOCs and dozens more."

The resulting railway is incomprehensible, ugly, more expensive than the one it replaced, and incredibly mean-minded. We love the railways (and Engel gives charming evocations of some of the prettier routes), but the railways don't love us. To the train operating companies we are potential fare evaders, hence the ticket barriers - "mousetraps", Engel calls them - being installed at stations across the network. Or we might be terrorists. At Leeds station, Engel takes out his camera and "up struts a jobsworth" demanding to see the pictures. The low point, though, comes when a buffet car attendant (as they used to be called), irritated at Engel's dithering over the "pile of cack" offered for sale, suggests: "Have a bacon roll, you cunt." But we can all wipe the grins off our faces because, as Engel concludes, "It is not the politicians, in the final analysis, who are responsible for the mess. It is us, because we let them do it."

• Andrew Martin's novel The Last Train to Scarborough is published by Faber. Matthew Engel is at the Hay festival tomorrow