When Patrick Gale's mother went into a care home, he inherited a chest of drawers which he discovered was full of letters.

Like any self-respecting novelist, he could not leave them unread. From the farm in Land's End where he lives with his husband Aidan Hicks, Gale laughs at the memory, although it is clearly bittersweet.

"It was basically all the letters she had ever sent her mother, or her mother had sent her back. So this was a cache of letters from the early 1950s, right through until the late 1970s. They are frank in the way that letters between a mother and an elder daughter only can be. In the middle of all those letters I found this little school file, a spring file, which contained an unfinished handwritten memoir by my grandmother, and it was that that really sparked the novel off." In it, he found clues to 'Cowboy Grandpa', about whom little had ever been said. "It told stories granny had told me before, but it somehow really brought to the fore the story of her father, which again she only sketches in, but it seemed much harsher and stranger than it had struck me before."

His grandmother Phyllis had been brought up by her aunts and uncles, and barely knew her father. His name was Harry Cane. A well-to-do, shy gentleman, he had married into the same family as his brother. Fallen on straitened times, he had moved with his wife and young daughter back to his wife's family home in Twickenham. Shortly thereafter, Harry left for Canada, never to return.

I imagine Gale shaking his head at the thought. "The idea that his man should have abandoned his wife and little girl. It seemed such a strange thing to do when up to then everything she had sketched in about him had been so easy going and pleasant. It made me think there must be more to it than that. What would drive you to do such a thing?"

Keen to answer this question, Gale began writing A Place Called Winter, this being the name of the place in the Canadian prairies where his great-grandfather bought land and settled as a farmer, one of the new wave of immigrant pioneers at the turn of the 20th century whose cabins and houses were soon spreading across the country.

Although this is Gale's first foray into historical fiction, readers familiar with earlier novels such as Little Bits Of Baby, Notes From An Exhibition and A Perfectly Good Man, will find the recurrence of themes that flavour all his fiction, among them gay relationships and strong, likeable women. Nor has his easy, engaging style been lost in this most personal, affecting tale.

Although, when he started writing, Gale vowed to stick to all the known facts of Harry's life, the great secret around the reason he emigrated allows him considerable room for imaginative licence. It's no surprise, then, that instead of suggesting Harry was guilty of some heinous crime that even today would make readers shiver, he takes an entirely different tack, and decides he had been found out in an affair with another man.

Did he even dare think his grandfather might have committed some appalling act? "Oh I did, I did. The more obvious grubby ones. He could simply have been caught out in some shady dealings. I don't think having an affair would have been enough, but he could have been a paedophile or something. What I made up had to be something that wouldn't put the reader off him. I didn't want us to lose sympathy."

Nor do we. Harry emerges as a diffident and gentle individual, whose stammer is symbolic of his lack of confidence in his position in the world. It's no wonder he feels out of place in this era, says Gale. In these years, he recalls, "the Oscar Wilde trials cast a shadow and a climate of fear. At the same time, most people didn't have the words to describe any of the things related to it. We weren't nearly as literate in psychology and sexuality as we are now. And so it's a novel about something that was literally unspeakable. Even Harry can't really voice to himself what he wants or what he feels or what he is. Which is a challenge to the writer of finding ways around it."

Speaking to historians in Toronto, however, he discovered that his fictional hypothesis might have been true, if not for Harry then for others. "They said, 'No, no, we do believe that in this period, when there was such a rush of strangers and immigrants into the Canadian west, it was quite clearly used as a kind of respectable solution for families with black sheep, for whatever reason.' I found a couple of stories, of people, priests, whatever, who were caught out in gay behaviour, who were hurried out of the country before they could be arrested and sent to Canada. Ironically people thought, 'Oh, it'll make a man of them!'"

Gale laughs. "Whereas of course at this period, when there were hardly any women there, what you were doing was sending them to a kind of gay heaven."

But while Harry is to find enduring love, much of his story is sad. Too sad, indeed, to be told. "I had decided early on, I was going to frame the novel with a chapter set in the 1950s at both ends," says Gale, "so it would very briefly cover the period when Harry came back to England." A photo of that return in 1953 is on his website and, knowing the little we do about Harry, it wrings the heart. A sombre, fine-looking man in a long raincoat stands at a distance from his grand-daughter and daughter, who is holding Patrick's sister in her arms. Harry looks as if he's an outsider, not part of the scene.

"I hadn't read any of the letters from that period," Gale continues. "I thought, no I'll save that as a kind of dark surprise until I've written the rest. I came to read the letters and they were so sad I realised it would be unbearable to put them in the book... My grandmother, who then must have been in her mid-fifties, was clearly deeply uncomfortable about being reunited with her father. She really couldn't get him out of the country quickly enough, and obviously felt deeply conflicted. Partly she couldn't quite put into words why she felt so uncomfortable."

Perhaps the best-known personal fact about Gale, who was born in 1962, is that he was brought up as a child in Wandsworth Prison, where his own father was the governor. Crime and punishment run in the family, evidently. But when he speaks of Harry choosing to be cast out into the wilderness, in every sense, Gale's sympathy is heartfelt, as is the reader's.

"Yes, Harry avoids arrest and prison, but what he puts himself through is every bit as harsh as the punishment he would have had in prison. What he condemns himself to is years of hard labour. This was a man who had never worked with his hands before in his life, yet here he is having to learn to plough with an ox and put up fences."

While Gale's husband runs their Cornwall farm, he is an avid gardener and grower of vegetables. The scenes of Harry's initiation as a farmer are almost wistful, Gale evoking the land, and what it takes to work it, with real understanding. What he also appreciates is the freedom a place like Winter could offer, and not just to those like Harry who had been forced to flee their earlier lives. For women too it represented an unheard of liberty, and his depiction of the friendship Harry makes with a neighbouring farmer, Petra, is an affecting layer of a tale rich in relationships, not all of them doomed.

He sounds pleased when I tell him how much I warmed to Petra, who is feisty but thoughtful, and courageous in a way few women are ever required to be. "I've always loved writing female characters, and it was totally interesting from that point of view. I felt that what the novel turned into was not just women handling new chances of independence, but an account of chaste friendship between men and women, which is not often written about. There was something about this period that particularly enabled those friendships. Partly because it was still a great letter-writing period. But women were also becoming more assertive and coming out of the woodwork, and that involved having equal conversations with men, which must have led to equal friendships."

If writers must have a splinter of ice in their hearts, Gale's has all but melted. Not only did he give Harry a better fictional outcome than actually occurred, but he spares us other tragedies that his family suffered. That is not to say that A Place Called Winter is a happy book. It is full of heartbreak and even, at times, extreme violence. So, since he can never know if his portrayal of Harry has come close to the truth - even it certainly feels entirely believable - how did he feel creating a speculative work of fiction that might be miles from the reality?

"It was very odd," he confesses, "because what it's done is create a completely artificial memory. I can't look at his photograph now without thinking of my fictional version of him. Just the other day I had to correct one of my nieces who was saying to one of her friends about the book, 'Oh yes, it's all about our gay great-great grandfather'. I said, 'No, no, no! We really don't know what he was. Quite possibly he wasn't gay at all.'"

A Place Called Winter by Patrick Gale is published by Tinder Press, price £16.99. Patrick Gale is appearing at Aye Write! on April 23