Early morning at Tate Britain; no crowds. In the Victorian room that houses the Pre-Raphaelite collection, I’m standing beside Richard Dadd’s enigmatically titled "The Fairy Feller’s Master-Stroke". I tell the photographer about the history of the painting, and the painter, and as I do so I become increasingly irritated with a smudgy blotch on the glass, at the top right. Eventually, I take out a cloth for cleaning off my computer screen and scrub vigorously until the glass is clear. Nobody comes to arrest me.

Beside the painting is a small plaque which says, "Presented by Siegfried Sassoon in memory of his friend and fellow officer Julian Dadd, a great-nephew of the artist, and of his two brothers who gave their lives in the first world war". With no one else around, I am able to stare at the painting until I have had my fill, but when the photographer moves me on I am still not satisfied.

Reason tells me that I would first have encountered this painting, reproduced pretty much full-sized, in the fold-out cover of a Queen album, at the age of 14 or thereabouts, and it made no impression upon me at all. That’s one of the odd things about it. You have to see it in the flesh, paint on canvas, for it to become real. And, when you see it, several things become apparent, some immediately, some eventually.

I first visited the Pre-Raphaelite collection at the Tate in my early 20s. As a teenager, I had loved the work of the comic-book artist Barry Windsor-Smith, who made no secret of his Pre-Raphaelite influences, and I wanted to see them close up—Millais, Waterhouse and the rest. I went there, and I liked and admired the paintings, and decided that I did not like the work of Dante Gabriel Rossetti as much as I rather suspected Dante Gabriel Rossetti had, and that the Burne-Jones picture of the ladies going downstairs made me catch my breath.

They had several Dadd paintings too, there apparently almost by default, as if there was nowhere else to put them. I saw "The Fairy Feller’s Master-Stroke", and was obsessed.

The Dadd painting that ensnared Gaiman, “The Fairy Feller’s Master Stroke”

Shortly before that first visit, I had received a copy of a book to review—a book of photographs, mostly taken by a Victorian doctor named Diamond, of the inmates of Bedlam. Hopeless, bedraggled lunatics squinting at the camera, posing awkwardly for the period of time it took for the photographs to be exposed, their faces are frozen, although their hands often blur into things like the wings of doves. These were studies in madness and pain, and only one showed a man—a lunatic like the others—actually doing something.

The madman in the photograph, which was taken by Henry Hering in 1856, has a beard. He sits at an easel, on which he is executing an oval painting of remarkable intricacy. He stares craftily at the camera, and there is a small, fierce smile on his face. His eyes glitter. He looks squat and proud. And when I first saw his masterpiece, "The Fairy Feller’s Master-Stroke", I realised that the white-bearded sorrowful dwarf who dominates the centre of the painting, staring out at the watcher, is the painter himself, Richard Dadd, grown old.

The visitors to the Tate who seek out the Pre-Raphaelite rooms are there for their own reasons, and are responding to something distant and melodic. The Waterhouses and the Millaises and the Burne-Joneses exert their own magic. Spectators wander past the paintings, their lives enriched. The Dadd, on the other hand, is a snare, and those people with a place in their soul for it are hooked. We can stand in front of that painting for, literally, hours, lost in it, puzzling over these fairies and goblins and men and women, trying to understand their size, their shape, their eccentricities. Every time you look at it, you discover something, someone, you have not seen before.

Dadd knew who they were, the people in the painting. You know that when you see them. He wrote a poem about them, in Broadmoor, "Elimination of a Picture & Its Subject—Called The Feller’s Master-Stroke" (that’s how the painting gets its title), but he was a better painter than he ever was a poet.

If you’ve ever seen the painting reproduced, if you’re on a journey specifically to see it, then the next thing that will surprise you is its size. It’s smaller than you imagined—smaller than seems possible. There is so much to fit in, after all. The authorised Tate reproduction of "The Fairy Feller’s Master-Stroke" I bought after seeing it the first time was almost twice the size of the picture itself, and was as satisfying as a photograph of a meal would be to a hungry man.

The painting is not the reproduction. The thing itself, in its frame, has a magic—in the colour, in the detail—that no photograph, no poster, no postcard, even begins to capture.

So you look at the painting, seeing every brush stroke, every nuance of paint on the daisies.

And you can look at it for hours before you notice something else, something so big and strange and obvious you can’t understand why you didn’t see it at once, or why no one else has commented upon it.

It’s not finished.

Much of the bottom of the painting, where the colour choices seem odd and washed out, is only outlined on the light brown of the undercoat that covers the canvas. The fawn-coloured grass that pushes the eye up to the Feller himself is fawn because Dadd—who took nine years to paint it—ran out of time. He gave it away in 1864 before it was done.

And there’s one final thing you will know, without question, if you’ve seen that painting in the flesh, and it’s this: Dadd knew what he was painting. He had seen it, through those crafty eyes. He had gone on the great journey, the grandest of grand tours, and this was what he was bringing back.

Those of us who write fantasies for a living know that we are doing it best when we tell the truth. There is something that people will respond to—the "True Quill", as a Texan writer I met once called it. My new novel, "The Ocean at the End of the Lane", includes a lady on a Sussex farm who is older than the universe, and a strange flapping creature from somewhere outside space and time who comes into the young protagonist’s life in the form of an evil nanny. None of it is true, except it feels right. It feels honest.

Before Dadd’s madness, before he murdered his father, before his ill-fated journey to France (he was arrested on a train, when he attacked a fellow passenger, on his way to Paris to kill the emperor), his paintings are quite pretty, and perfectly ordinary: forgettable chocolate-box concoctions of fairy scenes from Shakespeare. Nothing special or magical about them. Nothing that would make them last. Nothing true.

And then he went mad. Not just a little bit mad, but quite spectacularly mad; a murderous patricidal madness of demons and Egyptian gods. He was locked up—first in Bedlam, later one of the first patients in Broadmoor—and, after a while, he began to paint, trading his paintings for favours. Gone were the chocolate-box fairies. Now there was an intensity to his paintings and drawings of fairy courts, of

Bible scenes, of his fellow inmates (real or imaginary), that makes those we have such treasures. They were worked on with a passion and single-mindedness that is, quite simply, scary.

Dadd spent the rest of his life behind bars, surrounded by the criminally insane, and as criminally insane as any of them, but with a message for us from, as it were, the other side. Otherwise, his life was wasted.

Still, he left us paintings, and riddles, and one unfinished masterpiece which continues to obsess. Angela Carter wrote an astonishing radio play, "Come Unto These Yellow Sands", about the painting, Dadd’s life and Victorian art. I wrote a film treatment once in which the painting was a key, and I came close to organising an anthology in which each story would be about one of the witnesses to the Fairy Feller’s chestnut-smashing blow.

The painting, like the painter, will always remain a mystery. As Dadd himself puts it, at the end of his poem:

"But whether it be or be not so

You can afford to let this go

For nought as nothing it explains

And nothing from nothing nothing gains."

Tate Britain open daily, 10am-6pm, admission free; tate.org.uk