HOW is a painting made and how does it end up on the wall of an exhibition?

In my career I have written about such questions hundreds of times. But this time, in this instance, it's different - the painting is of me and my wife. The other day, some men from a fine art removal firm came to take the painting - titled Phil + Hope, 2009 - off our living room wall. It is now part of Alasdair Gray: From The Personal To The Universal, the major new show at the Kelvingrove Art Gallery and Museum in Glasgow, where it hangs with more than 100 other works.

Seeing the painting being taken down and wrapped took me back to a dark, cold night in early 2009. Hope and I were sitting, perhaps slightly self-consciously, on Gray's sofa. We had just become engaged and we had, in a moment of high-spiritedness, joy and excitement, decided to have a portrait of both of us painted by the artist. So we sat as Gray - the polymathic genius of Scotland, the writer of Lanark and the painter of beautiful public murals - talked to us in his variety of voices and idioms, and we tried to stay still and feel relaxed as well as engaging in conversation with the artist.

If I remember rightly, we had eaten a fish supper on drizzly Byres Road before our brief assignment as (fully clothed) life models for our own portrait. After a brief buzz at his door, Gray had ushered us into his home, which was at that time being fitted with central heating for the first time - floorboards were up, and an air of slight disorganisation reigned. His late wife, Morag, was in spiky form, making us tea and reminding Gray of various things he had to do the following day.

Gray ushered us into his living room. It was full of books and paintings (including several portraits), pictures and paint, brushes and pencils. We sat on a sofa and silence descended. Where and how did Gray want us to sit? We had done some preperation - we found a "pose" which wasn't too complicated. We didn't dress up. I held Hope's hand.

Gray remarked that was fine, and sat on his other sofa. He put a large piece of brown paper on a board, and rested the board on his own lap. Then he starting drawing us with a pencil. He made marks in clean, clear lines. Vainly, I asked him to pause while I took my glasses off. Hope readjusted her legs. The electric fire groaned a little, and we sat engaged in peculiar conversation, for an hour or so. Gray changed the angle on one of our limbs, and spent some time drawing our faces.

How had our lives come to this strange pass? It was in late 2008 that Hope - Ms Dickson Leach, a film writer and director -had started pondering the idea of a Gray portrait of the both of us. It was to be a wedding present from a relative, and was preferable, to my mind, than cutlery or bed sheets. Why have a portrait of yourself? I must admit I did have second and indeed third thoughts. On the face of it, it could be seen as a vain act. On the other hand, the idea of commissioning an original piece of art, especially by one of my favourite artists, had long appealed.

I had, of course, been covering Gray's art and writing since I first became an arts correspondent, when I worked at The Scotsman in the late 1990s. At The Sunday Times and then, from 2002, The Herald, I had often interviewed him, whether over the phone or in person.

These encounters did not always go well - after one story in that Sunday paper, Gray said he would never speak to the press again. But we had always remained on a basically cordial footing. I was, and remain, in awe of Lanark as a novel and as a work of art. But I had always found his paintings and portraiture - the murals in the Ubiquitous Chip, the cover illustrations of his Book Of Prefaces from 2000, for example - more entrancing than his writing. At their best they had always struck me as reaching the figuratively clear but visionary qualities of William Blake.

Perhaps like many, I had wandered, in various states of disrepair, past those pictures in the Chip, and wondered what it would be like to have my own face drawn by the great artist. Gray's portraits had always seemed to be idealised, perhaps perfected images of the people he drew or painted, whether they be workers and chefs, mythic figures, writers and poets, or just people he knew or liked. I was curious, in a self-conscious way, of how he would render me and, more importantly, the woman in my life. And I warmed to the idea of an idealised, perfected self-image that would never change, or fade and date like photographs do.

Hope was also a great fan of Lanark and knew and loved his art work too. She was living in London when we met and the piece was commissioned when we were both shuttling between the two cities. "I'd read Lanark as a teenager," she says, "and it had shot straight into my top 10 books and stayed there. I love that book. When Phil told me that he had interviewed Gray, I was a bit star-struck, honestly. The idea that I now was in the same city where Gray walked the streets was exciting and made Glasgow feel a bit shiny and special."

She adds: "The interesting thing about portraits, to me, is they reveal as much about the artist as the subject, and getting to see yourself through someone else's eyes is an intoxicating idea. It felt like a privilege that we would get to see how Gray saw us."

So I contacted Sorcha Dallas, the gallerist and arts agent who was doing such a good job of stabilising and handling Gray's affairs, and at that point was running a gallery just around the corner from Glasgow's High Court. I proposed the idea and fairly quickly a price was suggested and accepted, and our first sitting with Gray had been arranged.

"We actually did two sittings for the portrait," Hope continues, "and all I remember is that we talked all the way through them. We sat and chatted, and he chatted to us with several different voices. Occasionally his wife Morag came in with a crossword clue she needed help with. It was immensely relaxed.

''I looked around the room, at all the drawings and paintings that were underway, all the pens and pots of paint sitting on his desks. They were having central heating installed in the flat at the time, so most of their belongings seemed to be piled into the room we were in ... It felt a little bit like what it might be like to be inside his head."

Why do people ask for portraits by Gray? Sorcha Dallas says there are actually very many every year. From portraits of individuals to family members, portraits for wedding invites - indeed he drew Sorcha and her husband Robert for their wedding invitation - and group portraits, such as the image he created of the band De Rosa for their album cover.

He has made hundreds over the years. And he enjoys it. "He does," she says, "and I think what is interesting when you have been drawn by him is his distinct style coming through. The strength and simplicity of his line. I always think he draws people with strong features really well for this reason as he gets lost in eyebrows, strong noses and lip lines. He has done hundreds over the years, some have been fast - on napkins, paper or whatever was to hand when he was approached in bars and cafes - and others have been reworked over the years. Some of my personal favourites are of his son Andrew - he was such a lovely looking child, and there is real warmth and love in the drawings."

Dallas also thinks portraits are "a lovely way to capture a moment in time". She adds: "It also is a unique record of that moment. Alasdair's drawings I feel are quite timeless, whereas photos often become dated. There is always a freshness at looking at one of his works."

Are people still commissioning portraits from Gray. "Yes, they are - although currently he is pretty tied up with a major new painting commission for Glasgow Museums for St Mungo's Museum."

After the two sittings, in which Gray heftily expanded the size of the picture, we parted ways. We waited anxiously for it to be completed: Gray had to paint, with acrylic, our clothes, the sofa, but not the background, which would remain plain brown paper. After some months, Dallas said I could pick it up from her gallery.

It was framed, and beautiful. My face was recognisable as me, but not identical to real life. He had given me a full head of hair (for which, many thanks, Alasdair) and Hope's swirls of hair had been beautifully captured. We look like ourselves, but somehow heightened. Our features have been both captured and simplified. It reminds me of something Picasso said: art is a lie, which happens to be true. It looks like us but is not us, and is its own thing. In that way, hanging it on a wall as something to be admired and enjoyed is very different from photos: it is both us and not us, and is in fact its own world, one remove from reality. In some ways, it does not feel like a portait of Hope and I at all.

"I love the picture," Hope says. "I love our hands in it, and the way it doesn't really look like us - my boobs are bigger in real life - but he's captured the way we look at each other. It reminds me of our engagement, our life before we had a family, and that is what is at the core of our family: the way Phil and I look at each other."

We hung the portrait from a simple hook on our living room wall, and there it has remained, admired and loved - until the curators at Kelvingrove emailed me about the Alasdair Gray show.

Two children have arrived in our lives since we hung that painting on our wall. And so the morning the men came to take it away from our living room was a slightly traumatic one. Our sons, now aged four and two, have always loved the picture and consider it to be theirs too. However the men from Constantine Ltd, the fine art removals firm, allowed the boys to watch the painting being wrapped up and, most exciting and special of all, allowed them into the back of their enormous truck as the painting was being secured.

The boys have not known a home without the painting. It will be strange but interesting for them to see it on the wall of one of their most common hangouts, the Kelvingrove. It also affords us a chance to try and explain how exhibitions work, and how sharing and lending is an important part of any life. There is a plaque dedicated to my father on the wall of that museum. And so for a few moments, when we visit the show, three generations of one family can be in one place, somehow, at the same time.

Our sons' presence has given extra weight to the painting. It is an artefact from a time before they were on this Earth. But for them, it will always be a document of when their parents were younger and (relatively) carefree. They can look at it and see their grumpy, busy, distracted or otherwise engaged parents in a purer form than reality, and its compromises and disappointments, sometimes allows. And when the day comes, that we pass away, they can still have us with them, framed and one-dimensional, but also vivid, young, healthy, looking at each other and holding hands, thinking of our future together, and the joys - mainly they themselves - to come.

"It will be nice to see it amongst all of Alasdair Gray's other pictures," Hope says, "to see our picture as part of a continuum of his work and to remember how lucky we are to have been a little part of it."

Of course, now the boys are no longer babies, we have been considering having them drawn by Gray, too. We are still thinking about it.

Alasdair Gray: From The Personal To The Universal is at Kelvingrove Art Gallery and Museum from October 11 until February 15