I had a salutary experience the other day. One morning I was enjoying the most interesting chat with the cream of the Scottish foodie world in Edinburgh's gorgeous New Town. We discussed the failings of the global food industry while drizzling fresh grass-green olive oil onto chunks of artisan sourdough, sighed with delight as our 45 quid-for-a-tiny-botte Balsamic gave up its fermented sweet-acidic depths, admired the variegated hues of heritage Scottish tomatoes and slipped down ripe jewel-like local raspberries. This is how everybody should eat, we agreed, each of us mentally repeating the campaigning mantra of good, clean and fair food for all. As I walked in a near-delirious state along the clean Georgian streets of the wealthy Scottish capital, it seemed to me that everyone I passed looked slim, fit and healthy.

Less than two hours later I was in the heart of Glasgow's East End, side-stepping spit and dog shit on the pavement. The main drag was busy with adult men and women on a Tuesday afternoon, and I couldn't help noticing that most were obese. In the part of town I was in, the food shops were mostly cut-price affairs hawking cheap white bread and rolls, plastic-covered discount cheese and as many varieties of sweets and biscuits as you could wish for, should you happen to need a cheap rush of hunger-defying sugar.

I felt my heart leap; here, before my very eyes, was food poverty in full, inglorious technicolour. The contrast could not have been more stark: poverty and malnutrition one side of the country, wealth and good health on the other.

I began writing this on a working title of "a tale of two cities" but of course this would be misleading. The nutritional divide exists in every town and city not only across Scotland (yes, Edinburgh too) but also throughout the UK and the rest of the world. Studies consistently suggest that obesity is a direct result of poverty and poor food choices: the cheapest available food is the highest in fat, salt and sugar and chemical additives.

I am aware of the impressive government-funded grassroots work being done in the more deprived areas of Glasgow and other towns and cities to try to overcome the lack of access to good healthy fresh food - the Shettleston Community Growing project and North Glasgow Community Food Initiative among them - and I'm not about to knock them; in fact I wish there were more of them.

The reason I'm raising the subject at all is a new book by Tim Spector, honorary consultant physician at Guy's and St Thomas's hospital, London, and author of countless papers on the causes of obesity. It's called The Diet Myth and it contains an interesting hypothesis about the real cause of obesity.

He says obesity is a modern global "timebomb" in the wealthiest and poorest countries alike. Last year in the US over 20 million children were obese, and two out of three adults in the UK are either overweight or obese. Mexico is the worst. Rates have tripled in China and India to almost a billion obese citizens. Even more shockingly, one in ten children in Japan, Korea and France - countries whose national diet once produced slim, healthy people - are now classified as obese.

By 2030 an extra 76 million people in the UK and US will be obese, bringing the totals to close to half the population. It won't be long until slim people become the minority.

Yet obesity remains a massively neglected area of medicine with little funding, no specialist training and no collective voice to combat the billion-pound marketing budgets of the food companies.

And here's the rub: their influence is reducing the variety of foods we consume by encouraging us to try different restrictive diets, and by only offering foods they want us to eat.

Some 15,000 years ago, says Spector, our rural ancestors regularly ingested 150 ingredients in a week. In our urbanised society most people nowadays consume fewer than 20 separate food items and many, if not most, of these are artificially refined. "Most processed food products come depressingly from just four main ingredients: corn, soy, wheat or meat."

Spector also posits the theory that the trillions of tiny microbes in our guts are likely to be responsible for much of our obesity epidemic.

Microbes are essential to how we digest food but they also control the calories we absorb and provide vital enzymes and vitamins, as well as keeping our immune systems healthy. Microbes have been working this way inside us, unseen and unsung, for millennia. However, their fine-tuning has gone wrong in recent times, and now we only have only a fraction of the diversity of species of microbes living in our guts – so our systems can't process the less healthy parts of the modern diet.

Spector urges us to "think of your gut as a garden you're responsible for, and make sure the soil (your intestines) that the plants (your microbe) grow in is healthy, containing plenty of nutrients. To stop weeds or poisonous plants (toxic or disease microbes) taking over, we need to cultivate the widest variety of different plants and seeds possible".

In a nutshell, diversity the key to good health and a well-balanced gut.

It makes perfect sense to me, but I can't help wondering how that will go down with the muffin-tops shuffling down a high street near you.