Royal College of Physicians president Sir Richard Thompson said plants helped reduce stress, anger and depression.
He added the fourth biggest cause of death in the UK was a lack of activity, making it important to provide green spaces in which people could exercise.
He made the comments at a green cities conference in central London.
Although a growing number of scientific studies have produced evidence supporting the idea that urban green spaces are good for human wellbeing, the issue still remains on the margins of healthcare strategies.
But Sir Richard observed: "When we look into the science of the beneficial effects of plants and gardening, there is quite a decent set of papers to read."
Referring to a series of "very impressive" controlled studies in the US, Sir Richard said they showed that gardens improved the mood within hospitals, reducing stress levels among patients, families and staff.
"What was very important was that the gardens had to have biodiversity - a variation of plants," he told delegates.
Among heart patients, the gardens were also shown to reduce post-operative anxiety, resulting in a reduction of medication.
But, he added: "Evidence showed that concrete gardens had no effect at all, so you had to have green gardens."
Sir Richard, a patron of Thrive - a charity that champions the benefits of gardening among people with disabilities or mental ill health - went on to explain how scientific studies had documented the health benefits of gardening.
"It improves your mood, increases flexibility, improves your balance and reduces the number of falls, which is a great problem for older people living at home by themselves."
He added that just getting outdoors had health benefits.
"We now know - from a recent study - that sunlight reduces blood pressure and a small reduction of blood pressure in the population produces a significant reduction of cardiovascular disease.
He concluded that urban green spaces could help ease the strain on health budgets.
"At a population scale, it can offer huge savings to the NHS by reducing the burden of preventable diseases, such as diabetes and heart disease.
"Some people say there is a gym outside your window, and it is much cheaper than a gym subscription."
Opening the International Green City Conference, International Association of Horticultural Producers (AIPH) secretary general Tim Briercliffe said urban dwellers were being cheated.
"Too often, we settle for second-rate landscapes because we do not know what it could be like," he told delegates.
He added that the AIPH event would "expose the foolishness of using the landscape as the place that savings can be made"."