Raymond Carver with his wife, the poet Tess Gallagher, photographed in 1984, in Syracuse, New York. Photograph: Bob Adelman/Corbis

At 8am on 8 July 1980, Raymond Carver sat down to write a letter to his editor, Gordon Lish. He'd been up all night worrying about the book they were working on together, and by the time Carver had finished writing there were more words in the letter than there were in many of the short stories for which he was known.

"Dearest Gordon," it began, "I've got to pull out of this one. Please hear me… I've looked at it from every side, I've compared both versions of the manuscripts… until my eyes are nearly to fall out of my head." The trouble was, Lish's version was so far from what Carver had sent him that Carver felt it was unrecognisable.

The pair had worked together for years – Lish, a dashing, influential literary figure once known as Captain Fiction, had published Carver's first stories in Esquire magazine. (They had met in Palo Alto, when Carver was, as his wife later put it, a "practising alcoholic" working at a textbook publisher's.) Lish later became an editor at Knopf and championed many other writers whose styles were unlike Carver's – Don DeLillo, for instance, and Richard Ford. He went on to give writing workshops at which he managed, by all accounts, to be gnomic, crushing and inspiring in relatively equal measure. Lish's own fiction – he wrote stories and novels – is compact, antic and self-reflexive, with titles such as Wouldn't A Title Just Make It Worse?.

Carver was about as far from this world – both in content and style – as it was possible to be. His characters worked in diners and motels; they had amputated limbs and their families had left them, with or without furniture; their working lives, their cropped, half-understood thoughts had not been seen in fiction. Lish had edited Carver's first collection, Will You Please Be Quiet, Please? and together they had composed a taut new voice full of left-field desire and hopeless dread. As Carver put it in the letter of 8 July: "You've given me some degree of immortality already."

But now Carver was desperate. This new collection, which he titled Beginners, was the first he had written since he thought he'd never write again – the first since he'd been sober, the first since he'd left his wife, the first since he'd met Tess Gallagher, already a well-known poet at the time and the woman with whom he was to spend the rest of his days. The collection meant a great deal to him. He pleaded incipient insanity as a way of asserting authorial control: "Now much of this has to do with my sobriety and with my new-found (and fragile, I see) mental health and wellbeing," he wrote to Lish. "I'll tell you the truth, my very sanity is on the line here." There were three stories in particular that were so cut back that he felt he could not live with them, whether or not they were objectively better: "Even though they may be closer to works of art than the original," he wrote, "they're still apt to cause my demise."

The letter is an incredible document, a missive from a man both indebted and imperilled, unsteady, spewing. It's at once a plea and a manifesto – it reveals the extent to which writing was connected to Carver's sense of self, and it reads much more like the characters he originally wrote, who, far from leaving things unspoken, say too much and still manage to scutter around the main point, which is perhaps only anxiety itself.

And there was a crucial difference between these stories and the ones they had worked on before – Tess. As he said in the letter: "Maybe if I were alone, by myself, and no one had ever seen these stories, maybe then, knowing that your versions are better than some of the ones I had sent, maybe I could get into this and go with it. But Tess has seen all of these and gone over them closely."

The book's publication went ahead, in Lish's form and under Lish's title – What We Talk About When We Talk About Love. It was received, in April 1981, to spectacular acclaim. It made Carver's name and remains his most famous book.

More than 20 years after Carver's death, Tess Gallagher has spent twice as long as his executor as she did as his lover. Carver, she says, dedicated that book to her with the promise that the original she had read and loved in 1980 would one day be published. Now, with the help of the Carver scholars William L Stull and Maureen P Carroll, Gallagher is bringing out the manuscript of Beginners. She describes the process as a "restoration", and says it has taken 12 years for Carver's words to be exhumed from under Lish's hand, so extensive were his marks. It makes the stories sound like the literary equivalent of the Sistine Chapel.

Tess Gallagher opens the door to her house in Port Angeles, Washington to the sound of wind chimes. She has the mischievous eyes and twinkling laughter of a good witch, and she leads us, the photographer and me, to a kitchen smothered in family photographs where she has baked us lemon and poppy-seed muffins. She imagines we must be hungry after our long trip to this watery, northernmost tip of the country. Gallagher was born in Port Angeles; Carver was born a few hours' drive away. She has said that the exposed, unornamented landscape inspired him, that it had something in common with the "forsaken quality" to be found in the lives of his characters.

She and Carver lived in this house for the last 10 months of his life (he died of lung cancer at the age of 50, in 1988). It is, as she says at one point, a "museum", and she doesn't tend to write in it herself, preferring to work in what she calls her "sky house", a secluded, teetering place on a hill up the road. But she has kept Ray's study more or less intact – the invitations on the mantelpiece, the casts of Tess's teeth, the childhood photographs, the keepsake from Chekhov's house in Russia. Even the aluminium mailbox at the end of the drive is as it was, with TESS GALLAGHER RAY CARVER stuck on it in capital letters. Everywhere in the house are portraits of the couple – Carver rugged and somber-seeming, Gallagher with a long mane of black hair, a neat painted mouth and eyelids like creamy, pale bells. Now her hair is silver and short, but before she had breast cancer six years ago she was a laid-back, bookish icon, who looked like a 1930s movie star who had studied to be a geisha and ended up in Haight-Ashbury.

They first met at a writers' conference in Dallas in 1977. Carver had been sober for five months. "He seemed very awkward and fragile," Gallagher recalls as we sit down in her book-scattered living room with cups of strong coffee, small dogs at our feet. "I was actually kind of apprehensive to meet him after hearing stories about him! You know, they called him Running Dog – he'd get himself into certain troubles and then he would have to run to get out of there. I remember he wanted to make a phone call and he asked if he could use the phone in my room, and I thought: Oh my God, I hope he doesn't make a pass at me!" She laughs loudly. "I'd be so sad to have to turn him down, he's so sweet! Thankfully, he just really did want to use the phone."

When they saw each other again a few months later, he had separated from his wife of 20 years, with whom he had a daughter and a son. (He'd met Maryann Burk when she was a 14-year-old waitress in the coffee shop where his mother worked. In an essay called "Fires" he describes, with shocking bitterness, the "oppressive and often malevolent" influence of his children, who "were eating me alive".)

Gallagher had been married twice before, to a pilot and to a poet. To hear her tell it, she had the feeling, twice over, that she couldn't, in some sense, save these men. The first had been to Vietnam and was changed by the war; the second was an alcoholic whose poetry found fewer readers than hers did. When she met Carver she was understandably wary, but things began on a different footing. "Ray was coming back from a death, really," she says. "He was a Lazarus. He was so bright, and so looking forward to the day every day. And I fell in love with that, too, I think – that here is somebody who loved life, and didn't want to live back in the rubble of past lives that had failed." But she says she fell in love with the writing first – "and then: 'Oh! Look at this man attached: my goodness, he's lovely, too!'" she laughs.

Gallagher worried that living with Carver might be like stepping into one of his stories, and sure enough, at first there were bill collectors at the door. But she took charge of that, and then she took charge of giving him space to write (in one house they lived in she gave him the study and wrote her own poems in the bathroom; in another she gave him the study and wrote at a picnic table in the park). Finally, she took charge of his fate itself.

"Listen," she told him, "I love you. But I did not come 4,000 miles across this country to get bad luck. My luck is good and I want it to stay that way. You'd better change your luck."

And so it went. But there was at least one sense in which being with Carver was like being in one of his stories: much was submerged, and some things were visible only to her. Gallagher remembers with great pleasure a day when her father, who didn't understand the quiet Carver at all, finally sighed and said to her: "Tess, there must be something about that man that just don't show."

At least since Carver's death, and long before lay readers were able to judge for themselves, as they will now be able to with the publication of Beginners, there have been whispers about Lish's impact on Carver. In time, it has risen in volume to a full-scale debate, along the following lines: if Lish edited Carver so heavily, then is what we think of as "Carver-esque" really Lish? And if Lish's gifts were such, why is his own writing not as well known as Carver's? When Carver's work became more expansive later in life, was that in fact a change of style or merely a change of editor? Did Carver worry that he would be unmasked? Did Lish worry – or hope – that Carver would be unmasked? Does it matter whose work it is at all, as long as the work exists?

One of the contentions is that the relationship between writer and editor changed over time so that Lish forced Carver to be more Carver-esque than he wanted to be. In one letter to Lish, Carver suggests as much, writing: "I know there are going to be stories… that aren't going to fit anyone's notion of what a Carver short story ought to be… But Gordon, God's truth… I can't undergo the kind of surgical amputation and transplant that might make them someway fit into the carton so the lid will close. There may have to be limbs and heads of hair sticking out."

On the other hand Carver was willing, even if a certain side of history casts him as a victim, and he did allow these stories to be published – indeed, in a letter written less than a week after the great missive of despair, Carver appears to give Lish carte blanche, saying only: "Please look at the suggestions I've pencilled in… even if you finally decide otherwise." Not only that, but Carver made a career out of these books, and he went on to write a third published by Lish. In that last instance, Lish edited lightly and offered up the edit with an ominous note: "To do less than this would be, in my judgment, to expose you too greatly."

When Lish spoke about the matter to the New York Times journalist DT Max in 1998, he told him of his "sustained sense of [Carver's] betrayal", and described Carver as a "mediocrity" he had discovered and made famous. When I contacted Lish for this piece, he sent a gracious reply, saying that he regretted what he had said about Carver already, and did not wish to say more.

What can we now see from the stories themselves? Often Lish's edits improve minimally, give shape to what's there, or alter a phrase so that it's actually more in keeping with the voice Carver has invented. But at other times the feeling is very different – the characters can be more brutal, for instance, and less is made of the women. Many stories are cut by 50% to 70%. Certain stories – "Beginners", one called "A Small Good Thing" retitled "The Bath" by Lish, and another called "Tell the Women We're Going" in both versions are different pieces of work altogether, with different plots and tone. A man murders two women instead of one; a couple never finds out if an injured son lives or dies.

More generally, Lish's edits become slices that depend on silence and suggestion, on the reverberations of the barely glimpsed. Carver's original characters did a lot more talking – they told drunken anecdotes, they wept, they felt, they contemplated, confronted, confessed. These differences are not stylistic – unless you consider earnestness and emotion to be a matter of style rather than heart or disposition. In the most changed of these stories, the edited characters simply would not behave the way Carver's original characters do; if they could, if they had the words or the taste to, there would, in a sense, be no story, since so much of Carver as we have known him until now is about what's unspoken. The edited characters well up; the original characters spill over.

Carver hated to be called a "minimalist", and he was called one often. One wonders if he disliked the term because he knew that minimalism was the aspect of his writing that was least his own. If you are a Carver reader who mainly associates his work with a certain style, then you may be surprised to find that the style itself – his sentences and paragraphs, the blunt, mid-air endings of his stories – was in many cases engineered by Gordon Lish. If, however, you take Carver's world as a whole – the brutality of intimacy, the unplaceability of anxiety, the mess any and all of us can make of love – you may think that Lish saw something in Carver, rather than imposing something else on him, and helped find a form to fit the content.

Then there is the strange, small, yet perhaps emblematic change: a ritual alteration of characters' names, so that Herb becomes Mel, Bea becomes Rae, Kate becomes Melody, Cynthia becomes Myrna, and so on. This habit in particular feels like an imposition, a suggestion that the editor knew the writer's inventions and his world better than he did himself. Here, you wonder how the relationship changed.

Was the relationship between Lish and Carver parasitic or symbiotic, and if the former, which way round? These are vexed questions of ownership and identity, and one might, of course, ask them of any artist's relationship with anyone else, spouses and friends as much as editors.

Gallagher, who says that she doesn't "necessarily feel that [Lish] is a villain", tells me that her interest is not in comparing the two versions. She just wants to show, as she puts it, "the connective tissue" between Carver's first collection, Will You Please Be Quiet, Please?, and his later one, Cathedral. There was not as much of a leap as readers suppose. In this sense she is offering up Beginners as an item of interest rather than a finished piece of work – a bootleg if you will. She won't say – and she smiles and she recedes from the proposition – whether she thinks one or the other is better.

"I really love these stories," she explains, "and I don't wish to banish even the book Ray had to stand by, and which made him in a sense internationally known, and which gave him the footing to write Cathedral. It also is a very intimate part of the story. You cannot throw that book away – it's a very important book. And I think there will be readers who will like some stories better, because of course that book has the advantage of having an editor. We could not go back when this book was restored and clean up things that you would cinch up if you were actually a line editor working with him on what you were going to allow to be his book. So we cannot make a fair comparison on that basis. We can just say what kind of writer we prefer." She adds that Beginners could never have been published in Carver's lifetime. "Anything fractious, he'd go like smoke up the stairs."

This is a smart, nuanced line for Gallagher to take. After all, to seem to be intent on restoring the true genius of the original Ray while simultaneously reaping the benefits accrued to the other Ray might begin to look like a double standard. The only time she becomes remotely heated is when I mention the journalist DT Max, and ask why she didn't speak to him all those years ago? (Max reported that Gallagher had refused copyright to a scholar who had been in the archive and wanted to show the extent of Lish's edits.) She says she wanted readers to be able to judge for themselves. "The readers can make up their own minds; we don't need the journalists, really, to tell us."

Does everyone want a piece of Raymond Carver? It seems that the much-theorised "death of the author" hasn't protected him from posthumous attacks. When you read about these battles, you wonder whether they are not serial acts of appropriation. Even Carver's first wife has written a memoir, in which she writes of the early stories composed while she was married to Carver in a protective vein, saying she felt angry about Lish's changes. "I must say, as the first reader, I resented it when Lish boldly changed the title." (She also reports that Lish told her she could only help Carver by releasing him from the bonds of family life.) It all depends on what you think a "normal" relationship between a writer and an editor would be, what a "normal" marriage would be. Is there ever such a thing?

For her part, Gallagher describes her relationship with Carver as "collaborative". She helped him, and it was reciprocal. She began to write short stories after she met him; he wrote more poems. She believes that had he lived, they would have carried on in that vein, lending each other their native forms, "because we were very stimulating to each other". Since his death, she has built two volumes of poetry around his memory – Moon Crossing Bridge, which was an act of mourning, and Dear Ghosts, published three years ago.

Gallagher describes the way she would read "every story as it came from his pen", how they would sit side by side on the couch and go through each one, page by page. "In my companioning of Ray's work," she says, "I felt very free to give suggestions, and he wanted that very much. Sometimes he would say: 'Well, write it out how you would do it and I'll figure out my own key from there.' It would always come back in the key of Ray." In a book called Soul Barnacles: Ten More Years With Ray, Gallagher prints a page from Carver's typescript for the last story he ever wrote, "Errand". On it, she has written by hand her suggestion for the last paragraph. If you compare this page to the story as it was eventually published, you'll find that the very last words of Carver's very last story were Gallagher's.

She had referred, earlier in our conversation, to the latter stages of Lish's relationship with Carver as "appropriational". I ask if she feels there is any possessiveness in her own relationship with him.

"You can't possess a great writer," she replies. "They're out there for us all. Why would I want to possess him? I had him for 10 beautiful, amazing years, and I think he's his own gift, out there to the ages. I do not consider that I formed Ray – Ray formed himself."

He couldn't have done it without you, though? I suggest.

"I certainly think he couldn't have. That is true," she laughs. "Amen! Because he really had quite a chaotic life before, and I'm a very orderly person – I mean in my interior world," she adds with another giggle. "Don't look at my housekeeping!"

Now Gallagher has a new partner, Josie Gray, an Irish painter who had not touched a paintbrush until he met her, and whose naive gouaches are on display all over her house. She encouraged him in his work, and now she spends her mornings on admin relating to Carver's work or Gray's before writing in the afternoons. She divides her time between Port Angeles and her cottage in Ireland, for which she has a great affection, and where she spent time with Carver.

"Ray said: the great thing about living longer is that you get to know more of the story," Gallagher smiles as we start to think about leaving. "And I have gotten to know a lot more of the story that he and I were living. Some threads have dropped out of that story, but a whole new story began that still has all this interweaving with my life with Ray."★

Beginners by Raymond Carver is published by Jonathan Cape on 15 October at £16.99. To order a copy for £15.99 with free UK p&p go to guardian.co.uk/bookshop or call 0330 333 6847