I have seen human degradation in some of its worst places, both in England and abroad," wrote a man named JC Symons.

"But I can advisedly say, that I did not believe, until I visited the wynds of Glasgow, that so large an amount of filth, crime, misery and disease existed in one spot in any civilised country."

It's that word "wynds" that dates Symons' observation. A social investigator, one of many, he was chronicling something of what he found in mid-19th century Glasgow - a city whose long economic boom, in the words of author and historian Michael Fry, brought with it severe social problems: gross overcrowding in wretched, unsanitary conditions.

Some contemporary observers fretted over the number of public houses in Glasgow. The chief constable of the time wrote that in the "very centre of the city" there was a mass of "squalid wretchedness" probably unequalled "in any town of the British dominions".

In 1837, soup kitchens were feeding 20,000 of the city's poor. They represented fully one in 10 of the population. Observers were shocked when they peered down dingy wynds and closes at people whom Fry characterises as starving, verminous Glaswegians.

All of this occurred during a momentous period when the city was in the grip of astonishing industrialisation and prosperity, not to mention an equally remarkable spurt in population. In 1801 it was home to a mere 77,000. By the end of the century, swollen by, among other factors, boundary extensions, and immigrants from Ireland and the Highlands, the population had grown tenfold.

Mass Irish immigration, however, fuelled sectarian conflict, while poverty and unemployment and territorialism gave rise to gangs. During the 1870s and 1880s, as another author, Andrew Davies, has noted, there were reports of gang feuds and larger-scale sectarian skirmishes.

Hand-in-hand with the city's growth went strenuous improvement efforts by city fathers intent on establishing a "model municipality". Over time, from the mid-century onwards, much of the most squalid housing was demolished and replaced. By 1874 the homes of some 15,000 had been vanquished: among the modern streets and buildings that arose in their place was the stunning Victorian edifice of the City Chambers on George Square.

The list goes on: Loch Katrine was recruited to give the city clean water. Public health and sanitation campaigns were carried out with efficiency and vigour. Glasgow began generating its own electricity. It opened tram and telephone networks, and even, in the interests of culture, opened Kelvingrove Art Gallery and the People's Palace.

Yet certain problems persisted. No sooner had the the worst slums been knocked down, for example, than the next-worst appeared in their turn intolerable. The city, Fry writes, "was no closer to abolishing slums in 1902 than in 1866".

Mortality, too, was stubbornly higher in Glasgow than anywhere else in urban Scotland. In 1900 there was even an outbreak of plague, in which 16 people died.

Glasgow has made so many strides in recent decades that it can be hard to keep up. It has reinvented itself as a shopping and cultural destination, as an ideal place for a weekend break - and as the venue, this summer, of the Commonwealth Games. Equally, like other cities, it has areas where many people endure lives on the margin: deprivation, unemployment, poverty, abbreviated lifespans. Reading Fry's researches on the Second City of the Empire, it's clear that certain social problems, if not exactly having their roots in the 19th century, were prevalent to a startling degree, and were so entrenched that tackling them would obviously demand an innovative civic approach. There are, in the book's pages, certain echoes, too: when you read about those soup kitchens in 1837 it's hard not to think of the food banks that are giving tins of food to needy Glaswegians in 2014.

"The Victorians thought they had the answer to the question of urban renewal, and that was essentially for city corporations to be given much greater powers than they had ever had before," Fry says. "At the beginning of the 19th century ... the city was essentially still within its medieval boundaries, so they had to sort out that problem.

"Then you had to give the councils powers over private property. This was a big psychological change for the Victorians, who thought private property was sacred.

"Glasgow really led Britain in saying, 'We have industrialisation and huge social problems arising from that, and the only way to deal with this is to have public agencies big enough to tackle the problems.'

"In those days, nobody really thought of the central British state as the right agency to deal with problems like Glasgow's.

"In Glasgow, the city fathers, who had built up their fortunes in the previous century from slavery and tobacco and were reasonably philanthropic, realised they would have to seize these problems by the scruff of the neck.

"They got an Act of Parliament in 1866, giving them powers of compulsory purchase and the wherewithal to flatten the city centre and rebuild it."

The city's leaders also had a vision of the ideal industrial city. What should a reconstructed city look like? What kind of services should it have? What kind of lives should its people lead?

"The vision was that there should be a range of public services," says Fry. "The rich could be left to look after themselves, while the good, honest, working class - the people who swung the hammers for not a great deal of money - should be provided with all the wants that they themselves could not provide. It was very much a benevolent and paternalistic exercise."

A key point was that the city was to be rebuilt with long, straight streets, large squares, and impressive architectural specimens, such as Kelvingrove. "The feeling was that bad buildings caused bad people, so if you have good buildings you would have good people.

"When it came to the social problems, the city council intervened in a high-handed way. You might say the city's ruling class had quite firm control of the proletariat.

"You had innovations like ticketed buildings, in which inspectors would assess how many people each flat could legally house.

"There weren't, however, any class tensions or sense of class struggle," he claims, adding: "All the great captains of industry had started out as apprentices in the Clyde shipyards. They provided jobs for the rest and kept the whole process of industrial innovation ticking over.

"There was no great social distance between the capitalists and the workers, because they were all the same kind of people. The workers tended to admire those of their colleagues who had risen and done very well for themselves.

"Certainly up until the First World War, the vision of an ideal industrial society was realised, in that the city worked very well. It didn't run up huge debts. The city was vastly improved on what had been there before. And all of this was achieved by local initiative."

The tenements that were built in their thousands were of solid quality - many are still inhabited today - and were better than the council flats that were flung up after the Second World War, he adds.

At its peak in the 20th century, according to Fry's book, the corporation "owned 63% of the city's housing, yet this still included some of the worst in Europe, much of it of recent construction".

"Most of today's substandard houses was built in the 20th century," Fry says. "The surviving 19th-century tenements were very well built, unlike lots of the shoddy jerry-building in the 20th century.

"Every city has social divisions. That's what city life is all about. Collectively, everyone flourishes in a city, because they all provide services to each other.

"There is a great deal of social differentation. I don't know a city in the world that doesn't have good parts and bad parts, swish parts and slums.

"Glasgow to that extent is no different. I would say it suffered in the 20th century from the loss of the life of a smaller and more intimate city.

"In the 19th century everyone jostled cheek by jowl; in the 20th, as means of transport become more available, the whole thing spread out, so you've got comfortable suburbs and the inner-city.

"The fact that you have that kind of social division in Glasgow is partly the city's own fault, because for a long time after the Second World War it refused to allow any private housing to be built.

"In the long run that was a very short-sighted policy. The older, more intimate city can probably never be restored. Even so, the social divisions in Glasgow aren't fatal; it's not like some other cities. Everyone feels themselves Glaswegian; there's a kind of common basis there."

Public health, I say, has clearly been another troublesome and long-standing issue."Well, yes. Glasgow did have the last outbreak of plague in Britain, for a start. But you have to look at what they were coming from. Those migrants from the Western Isles who had been wallowing in muck probably thought the new life that awaited them in Glasgow was a much better one. The prospect of living in an industrialised society certainly didn't stop them from coming.

"There was pollution, of course. But because of their belief in private property, the Victorians didn't think the people who created the pollution ought to pay for the effects of what they were doing.

"When it came to overcrowding, you had to remember that people had large families in those days. It was nothing unusual.

"Lots of infectious diseases had no cure - cholera and typhus were quite common and were basically caused by unsanitary conditions. When you had an epidemic there was no way of saving people."

Speaking of migrants and immigrants: a short stroll away from the hotel where we have met is the Broomielaw. It's there that generations of Irish people would have had their first very glimpse of Glasgow.

The presence of so many Irish Catholics among the numerically superior Presbyterian Scots was bound to spark a reaction, and there's a sobering passage in the book detailing riots during the marching season in long-gone summers.

Gourock witnessed a week of anti-Catholic riots in 1851. Three years later, Protestant miners in Airdrie went on strike until all their Catholic colleagues had been sacked. In retaliation, an Orangeman was killed. Between 1855 and 1883 there were further serious disturbances all over west central Scotland.

When Rangers FC was established in 1872 and Celtic FC in 1888, writes Fry, "the occasional outbursts of sectarianism assumed a new and more durable pattern".

"We still have the same tensions today: prosperous, expanding economies attract immigrants," he says. "These immigrants, almost by definition, are poor people from poor places, and it takes them a while to assimilate.

"It was exactly the same back then, except that the contrasts between the prosperity of Glasgow and rural Ireland were probably even wider than anything we know today. People in Glasgow felt that all these dirty immigrants were lowering their standards and costing them money."

It seems indisputable that sectarianism has a much lower profile than in past decades, but it is still a tangible presence; only recently, The Herald reported Ireland's Edinburgh-based diplomat, Pat Bourne, calling for more to be done to stamp out the "lingering" stain of sectarianism in Scotland.

If you're looking for a link between the era covered in A New Race Of Men and our own time, there's an intriguing line on page 188: "Scots perhaps suffer a genetic weakness, or at least have too many bad habits, that make them rather unhealthy people, something as true for the 19th century as for the 21st."

In 1901, Scottish babies were expected at birth to live for just 40 years, as opposed to 45 for boys and 49 for girls in England; today, though the Scots figures have risen, they still lag behind those of England.

Fry laughs briefly when that line from his book is raised. "Scotland actually has an extremely good health service," he says.

"It has been proposed that the Scots have some kind of genetic weakness that makes them more unhealthy. Just as the incidence of red hair is higher in Scotland than in other countries, there might be something that gives people bad lungs or whatever.

"There's no other way of explaining the Scottish effect, that people in Scotland are on average more unhealthy than the English or other people. The alternative explanation is just that Scots simply drink or smoke too much."

Recent official statistics suggest that alcohol-related deaths have fallen sharply in Scotland compared to the rest of the UK, but the smoke-too-much, drink-too-much debate is one that you suspect could go on for a long time. In the meantime, read Fry's book. The Glasgow chapters are a forceful reminder not only of the great Victorian city's attempts to enforce lasting change but also of how far we have come. n

A New Race Of Men: Scotland 1815-1915 by Michael Fry is published by Birlinn, priced £25. The author is involved in two events at Aye Write on April 5 at the Mitchell Library - the first (1.30pm) on his book, and a panel discussion, Scotland And England: What's The Difference? with Lesley Riddoch and Rory Stewart MP (3pm). Call 0141 353 8000 or visit ayewrite.com.