St James's Park in central London.

St James's Park in central London. Photo: Paul Hackett

We find novelist Henry James on another dark London morning, at another twilight breakfast: coffee, rolls, butter and jam. He writes for hours. When he is done, he strolls from his dim, cramped Bolton Street rooms to the Reform Club for lunch. But instead of taking the direct route along the street - Piccadilly to St James, and then onto Pall Mall to so-called Clubland - the American expatriate takes the scenic route: into Green Park, south-east into St. James's Park, then north to the club.

Why a park and not a cafe or pub? For James, as with Australians today, the parks had distinctive value: medical, psychological, aesthetic. First, they gave him much-needed light, fresh air, room to move. James settled in the city to write, socialise and develop his career - it was the capital of his world. But it was a tough gig: harsh, overstimulating, cramped.

The parks compensated for this, letting him flex his legs, refocus his eyes, fill his lungs. By the Serpentine, the author was still in the city, with its cacophony and tubercular spit - but not of it. Second, and more importantly, the gardens gave James the beauty he prized: palpable, striking, rare. Happily out of the office, he invigorated his mind while he worked up a sweat.

But London's grim reality was never far away. On one afternoon, perhaps on his way to the Reform Club, James lingered a while in St James's Park. Among the oaks and avenues were the poor, who populated the park from the Westminster slums. Even with Buckingham Palace, the Horse Guards and gentlemen's clubs nearby, St James was stained by that ''low, black element''. ''There are few hours in the day,'' wrote the novelist, ''when a thousand smutty children are not sprawling over it, and the unemployed lie thick on the grass and cover the benches with a brotherhood of greasy corduroys''.

He nodded to Matthew Arnold's poem Heine's Grave, with its description of England as a ''weary Titan'': ''she now … stupidly travels her round/ Of mechanical business, and lets/ Slowly die out of her life/ Glory, and genius, and joy''. This was Dickensian London: overcrowded, filthy and filled with a beaten, bored lumpenproletariat. Yet the novelist wasn't put off.

''This popular resort has a great deal of character, but'' - he wrote of St James - ''much of its character comes from its nearness to the Westminster slums''. In other words, James was well aware of the hunger, filth and humiliation of his adopted countrymen. He noted the misery of St James, and of greater London beyond. He also acknowledged that London's size and speed left many cynical and jaded; that a single life was worth less in the imperial capital. Yet he didn't condemn it for this - on the contrary, it was a buzz. James greedily took it in, as if it were a sexy noir film.

''The impression of suffering is a part of the general vibration,'' he wrote, ''the note which, in all its modulations, haunts and fascinates and inspires.''

In short, poverty did not deprive St James's Park of its beauty, or Henry James of his aesthetic pleasure. The park was improved by trouser grease and hints of hopelessness - they were decoration, like unusual trellis work, or colourful stone gnomes.

Gardens, in this, can offer what Santayana called ''holiday reality'': respite from more general workaday cares. ''It is,'' writes Santayana, ''an affectation of the soul, a consciousness of joy … a pang, a dream, a pure pleasure.'' In St James's Park, Henry James was relieved of money worries, aggravating friction with his brother, and his own chronic loneliness. He was preoccupied, not by some grand cosmic ideal, but by aesthetic gratification. It was straightforward and immediate. The subsequent ''swell of consciousness'' he noted wasn't for anything - it was the means to its own end. The whole point was pleasure.

This is liberating, but also a little frightening: it shows how easily the psyche is relieved of its grown-up commitments, and how enjoyable this is. The well-worn patina of mature righteousness is cracked: we indulge ourselves. If anything, this recognition is cause for a certain humility: it wards off self-righteousness, by revealing how aesthetic desire can coexist with altruism, generosity, stalwartness. It shows how readily we seek asylum: but not always high-mindedly.

In St James's Park, Henry James demonstrated one of the garden's signature powers: illuminating the cracks of spirit that divide good souls.

>> Dr Damon Young is a philosopher and author. His new book Philosophy in the Garden (MUP) is out now.