There is something dandified about Impressionist Gardens, the blockbuster festival exhibition at the National Galleries of Scotland. Some may reach for less flattering words. Giant flowers pinned to the colonnades outside, the shop done up with trellises and gardeners' delights – all a bit soppy? But behind the oversized daisies lurks a decadent serpent. The intoxicating floral fantasies in which the artists indulge have less to do with Gardeners' Question Time than with Oscar Wilde's carnation, Baudelaire's Fleurs du Mal or Mallarmé's L'après-midi d'un faune.

Well, perhaps that will seem like pushing it when you are contemplating James Tissot's picture of Victorian cricketers picnicking with young ladies in a London garden, respectable manners all round, or a Monet painting that simply celebrates his first garden, in the 1870s, showing off the potted plants that would lead, as he got richer, to his creation of the lily ponds that were to become his greatest inspiration. But take a look at a scene by John Singer Sargent of a public garden at twilight. A couple stroll in the dusk, and the glow of his cigar blazes in the darkening air. There's a frisson, a strangeness to the moment – a sense that gardens in the 19th century were places of tantalising desire and danger.

Flowers are made for Impressionism. Perhaps they engendered it. One way to see this is to compare the paintings on the walls with books of botanical illustration on view in cases: even if you can identify every bloom in these paintings from the botanical volumes, the way they look is excitingly different. In these paintings flowers are not clinically delineated. They blossom into blobs and dapples and flecks and fronds of colour, manifestations of the artist's daydreaming delight. Impressionism's original impulse, to reveal the passing appearances of real life, could be tested at leisure in painters' gardens: but you see here how those heady blooms awakened the inner eye to symbolism and memory and unsayable poetry.

Garden paintings reveal the radicalism of the Impressionists. There's something gratuitous about the show – you feel slightly self-conscious to be looking at so many painted flowers, imbibing so much visual pleasure. Shouldn't art be more . . . serious? The instinct that makes us laud less gratifying art is, you realise, a moral masochism. The puritan impulse makes us praise art that proclaims its grim content. The Impressonists broke with the moralism of the Victorian age to revel in the visual world – a revolutionary hedonism then and now. In their sensual rebellion, they found new kinds of meaning. And so we come to the climactic paintings in which Monet sees all the vertigo and nostalgia and enigma of life suspended upside down in the reflections in his pond, where clusters of lily blooms float in the eeriest of voids.