Imagine this.

Imagine a little girl who sometimes worries that the world is going to end. She grows up in Prestwick and then Edinburgh in the 1970s and 1980s thinking about the nuclear bomb and reading John Wyndham's apocalyptic sci-fi novels in which the polar icecaps melt, society falls apart and aggressive plants attack people. On TV she watches Terry Nation's series Survivors where a plague wipes out most of the planet's population and those left fall out and fight over how to carry on.

Her dad is in the RAF. He was working in the Ministry of Defence during the Cuban Missile Crisis. He knows how close humanity came to mutually assured destruction. The bomb, and the fear of the bomb is everywhere. The culture is infected with it. It's in pop songs and sitcoms. She knows that not so far away, at Faslane, there's the base for Britain's nuclear submarines carrying first Polaris and, later, Trident missiles. She watches Threads, the BBC drama about what would happen in Sheffield in the wake of a nuclear war. She sees, too, snippets of the government's Protect and Survive public information films advising the population what to do if the Cold War turns hot.

Maybe she imagines what that would be like. Maybe she imagines the world, her world, evaporating, Maybe she imagines what might happen if she survived. How would she live in the bleakness of the nuclear winter? Would radioactive particles settle and seethe in her lungs? Soon, she becomes fascinated with CND.

She goes to university and studies medieval history. There she learns about the Black Death. In the 14th century 60% of Europe's population died of the plague. Almost two-thirds. Bodies filled plague pits. End times. She wonders if it could happen again.

She grows up. Somehow, despite all the nuclear warheads, despite avian flu and chemical weapons, the world goes on. But she keeps on thinking about how it might not. Eventually she writes a book about it...

Would you want to survive an apocalypse? That is the last question I ask Louise Welsh today. "It depends on if your eyeballs have melted," she laughs. "If it's that, of course you don't."

We are sitting in her Glasgow flat. She's made me soup for lunch and now we're taking coffee. The day is lit by late winter sunlight. Today, the end of the world couldn't seem further away.

But it's irradiated through our conversation. There are no melted eyeballs in Welsh's latest novel A Lovely Way to Burn, but that's only because the cause of death is viral not nuclear. The book is thick with death. Rotting bodies pile up and up, in hospitals and homes. London is choked with them, victims of a pandemic that goes by the name of "the Sweats".

This, the first of a trilogy, is the book that the girl who grew up worried about the end of the world was maybe destined to write. "I've been thinking about it for ... I don't know ... I couldn't tell you for how long. It probably does come from childhood."

If you read her books you might reckon Welsh has something of a morbid sensibility. She made her name with her debut The Cutting Room in 2002, a novel about Rilke, a second-hand book dealer (a profession that Welsh knows from personal experience) who discovers a stash of violent pornographic images that appear to document the death of a young woman. Since then she's published another four books that play with the darkest of themes. The latest takes her heroine, Stevie Flint, from selling toasters on Shop TV to stalking horror movie hospital corridors.

Yet in person she's bubbly and bright. I have arrived with the notion that maybe she was a teenage goth or something, secretly in love with the idea of death. "I think most teenagers are," she says. Did she hang around cemeteries? "Most of our holiday photographs will still have pictures of cemeteries. They're sociologically interesting. They're free, nice and peaceful."

Does that make her a goth? There are no skulls on her book shelves or Sisters of Mercy posters on her wall. And of course she isn't a teenager now. She's in her forties, and, she says, she doesn't have an obsession with death any longer. Actually, she worries about the teenage obsession with death and dying. It's an idea that needs to be challenged. "You just need to slap it out of them because it's horrible. I shouldn't say young people. Some people don't have quite enough knowledge of the permanence of death. And it is permanent."

What kind of teenager was she then? Not a brat, she says. "I don't think I was ever that bad but probably nobody ever does. With me it would just be clothes and I liked going out dancing and I probably stayed out later than I should.

"I was inhibited by never having any money at all. I would look at the paper and work out where the jumble sales were. I wore a lot of men's clothes, doing what kids do, trying to discover your identity. I never went joyriding or robbing shops."

Instead she went to work for Standard Life before going to university to study history (hence her obsession with the Black Death) and politics, which she didn't like much. "They've got this big, long, boring stuff about institutions and constitutions and all of that, which is important, but ... you could look it up."

The second-hand bookshop followed uni. The temptation is to imagine any graduates who work in bookshops are cocooning themselves from the real world (and, yes, I am speaking from experience), but that's not how it seemed to her at the time. "Good books are easy to sell but hard to get and so in the second-hand book trade you have to be out there engaging with people and other dealers and going to auction houses.

"Before the shop opened you'd be out at auction and when it closed you'd be out in your car bringing the haul back. That's the exciting part. Discovering stuff."

What did she discover? Photos, letters, diaries, wage packets (but never any money). Nothing like Rilke though? "I did have a friend who'd been in the business longer than me, and these ladies invited him round to see their brother's books after he died. When he got there they had this big bonfire in the garden and they were burning his pornography. He had a massive collection, really early stuff. He said to them, 'ladies, ladies, some of this is worth a lot of money.' They started to pull it out of the fire. Morality is one thing but money is another."

There wasn't much writing being done in her book trade years but she was reading and reading. She admits it was discovering James Kelman that helped confirm that the working-class world she'd grown up in was worth recording in print. And maybe women could do the recording.

Thinking back not so many years, she points out, "there weren't really female Scottish writers. And then we had Liz [Lochead] and Janice Galloway. I've written a piece about Sandy Moffat's painting The Poet's Pub, which I feel a bit guilty about because it's a good painting and I like him. But now that painting would be very different and it might not be in a pub and the women would have their tops on and some of them would be in the centre."

With work taking up most of her time Welsh was something of a later starter writing-wise. Eventually she applied to do a Masters course in Creative Writing at Glasgow and Strathclyde, graduating in 2000 with an MLitt. Two years later Canongate published The Cutting Room. Can she remember getting the letter telling her she was going to be published? "It wasn't a letter. It was a phone call. I was temping at an office up at Strathclyde." The same day she handed in her notice.

She hadn't told many of her friends what she was doing. "One of the first gigs I did was in one of those cavey, vaulty places in Edinburgh. It was with Hugh Collins who was meant to be the most violent man in Scotland. But he was a really nice man, lovely. We were riding on his coat tails. He'd brought a big crowd and when I got offstage a friend who worked as a bouncer came up and said 'my God, Louise, I saw you getting on the stage and I thought you were drunk. I was worried for you. I tried to get to the front.' 'So were you going to take me offstage?' I asked. 'Yes, actually, I was'."

How did you become friendly with bouncers then, Louise? "I used to go dancing all the time."

Louise Welsh met her partner and fellow writer Zoe Strachan on the same Masters course. They were friends for a year, Welsh says, "before we became romantic". Their mutual love of writing was, she adds, "quite exciting as well. We still share work".

Are you competitive with each other? "No, not really. Maybe a bit when we were younger. But it's something we tried to fight against. You've got all these historical examples of couples who get together and they are doing something artistic or scientific or academic and one of them gives it up to look after the other one. We made a conscious decision that that wouldn't happen, and I think that's quite important."

Did you go on dates? "We still do. We had a nice date recently. We went to Edinburgh Castle. It was just brilliant."

That's not always the case, it seems. "Dates initiated by me are quite often wrong. 'Let's go and see that new Steve McQueen film?' He's one of my favourite film-makers but I took Zoe on a date to see Shame and you can't even eat your dinner after that, let alone be romantic."

We now live in a country where the prospect of same-sex marriages may begin as early as this autumn. Can she imagine her and Zoe marrying? She swerves the question. "I think the fact that in the near future couples will be able to marry is the important thing. Whether they do or not isn't important. Equality is not something we should wait for."

As may be apparent she is politely reticent about answering questions about her emotional past. What she will say was her parents were always supportive. There was no big conversation about her sexuality. "I think this might be a common thing now. I think you worry more about telling them. They meet you more than halfway."

She feels, though, that it's her public duty to be open and honest about herself. In this, if nothing else, she's happy to accept the idea that she's a public figure. "From the LGBT side actually being out and open and present and relatively normal ... It can be useful that people see that kind of thing."

The same impulse can be found in her involvement in the Empire Cafe project with architect Jude Barber from Collective Architecture. In July it will host a series of events in the Briggait in Glasgow - think poetry and art and talks and choirs singing abolitionist songs - exploring Glasgow's links to the slave trade. "Apparently if you look at the telephone books in Trinidad and Jamaica it's all Scottish names and you do think next time we have Homecoming let's invite our brothers and sisters from there as well. Let's have them over."

At one point Welsh tells me, "your politics comes into everything". She's talking about her writing at the time. ("The idea of having your naked, tortured female body as just something to keep you turning the pages is kind of objectionable really.") But you can see the thread of it in her work and her life.

A few years ago Louise Welsh did a writing residency on the Roseneath peninsula. She'd sit and look over Loch Long and see the Trident submarines going up and down and the navy playing war games. We may not make TV dramas and public information films about the bomb any more but it's still there. She wishes it was otherwise. For the most part. "I'm anti-nuclear but you do appreciate there's a lot of money, a lot of jobs in these things."

And that's the thing, she says. Life, history is nuanced. The Black Death killed millions, but it also offered new opportunities for the survivors to throw off the reins of serfdom.

We haven't escaped the fear of the apocalypse, as anyone who's been paying attention knows all too well. "Places like Chernobyl or Fukushima are not so different from Glasgow or London or Paris. We can see our own possibilities within them." But Welsh believes there's something more, something better to be found in the darkest places when you start to think about them.

"In a strange way in this book I feel an optimism. You're reduced to human nature and what we think human nature would be at this point. And I think some people would behave quite well, actually. Some people would behave horribly, but there would be a lot of people doing the best they could."

That sounds like the world we live in, if you think about it. So imagine this. Imagine the world the girl who worried about the end of the world grew up in. Remember the rampant racism and homophobia of that world, a world of the National Front and Clause 28. Those things have not gone away, but nor have they metastasised.

The girl has grown up to live in a country that recognises that women can be writers and good ones at that, that will soon allow her to marry her partner - if she wants to - that hasn't got rid of the nuclear bomb (not yet anyway) but hasn't fired it either.

It turns out the world did not end. But the world has changed, some of it for the better. Is that a happy ending? Maybe at a push you could read it that way. n

A Lovely Way To Burn is published by John Murray priced £12.99. Louise Welsh will be appearing at Aye Write! in Glasgow next Saturday at 1.30pm. Visit