In September 2010, the writer Stephen Beresford was about to leave a meeting with film producer David Livingstone when he was asked: "Is there any story you are burning to write?" "Well, there is one," he replied, hesitating at the door, "but no one is ever going to make it." He acknowledges now that this is a line you can only use once in a pitch and explains that he went on to tell the story of miners in the Dulais valley in South Wales during the 1984-5 strike – the longest in British history – and a gay and lesbian group from London that donated more money (£11,000 by December 1984) to their cause than any other fundraiser in the UK, along with a minibus emblazoned with the logo LGSM: Lesbians and Gays Support the Miners.

In a decade when a degree of homophobia was the norm, LGSM drove a couple of minibuses from Hackney Community Transport and a clapped-out VW camper van to a bleak mining town in South Wales to present their donations, uncertain what sort of welcome to expect. The events that unfolded said a lot about what it means to be empathetic, to overcome dissent and face common enemies: Thatcher, the tabloids, the police. They told a story about solidarity.

"It is a story I'd known about for 20 years," Beresford explains. "I first heard about it when I was at Rada." (Now 42, Beresford started out as an actor but is also author of The Last of the Haussmans, an exuberantly accomplished debut at the National in 2012). "The story had become a legend in the gay community. But it was like Chinese whispers – I wasn't sure whether to believe it. I did think, if it is true, I'll write about it one day."

As Beresford talked to Livingstone, he had a hunch the story's moment had come. By the time he'd finished, Livingstone's eyes were "moist" and Beresford had secured his commission. Pride – the word could not be more charged – is his first feature film as a writer. Three years later and the film, shot in Banwen, Wales, and London, and directed by Tony-winning Matthew Warchus (responsible for Matilda the Musical, and soon to be artistic director of the Old Vic), is finished.

You might assume a romcom about striking miners and 80s gays was unlikely to be big box-office, but the same was probably said of Billy Elliot. Pride looks likely to be a massive hit. It is wonderful. I've seen it twice, laughed repeatedly, wept at the end. You might wonder how, after the defeat of the miners, an upbeat ending could be legitimate, but this is one of the film's many achievements. It is directed with finesse and has a fabulous cast (including Bill Nighy, Imelda Staunton and Dominic West). The story could easily have gone awry but never belly-flops into sentimentality – its feelgood factor is earned. It evokes the 80s uncannily. And what is most remarkable is that it does not trivialise the politics of the time.

It opens with a rallying Arthur Scargill on TV, saying the miners will, one day, be able to tell themselves: "I was proud and privileged to be part of the greatest struggle on Earth." Then there is footage of Thatcher, determined to smash the trade unions (a point made by a new award-winning documentary, Owen Gower's Still the Enemy Within, which describes the firsthand experience of those who lived through the strike). Thatcher appears, looking like a possessed marionette, her bossy elocution a declaration of intent, as if she means her voice to carry, to be heard generations on.

Most of the real people who were involved are alive to tell their tales, although Aids casts its shadow in the events of the film and has taken several LGSM members (this is not Pride's primary subject but readers who would prefer not to know anything about its impact on the film should stop reading here). Beresford's problem was how to make contact with the survivors from the mining community and LGSM with no obvious internet trail to help him.

But one crucial find – a half-hour documentary, All Out! Dancing in Dulais, created by LGSM for the miners – became a vital resource and makes a fascinating introduction to the cast. Its most arresting character is a charming, fresh-faced Irish boy, Mark Ashton, who died of Aids in 1987. He was one of the founders of LGSM and talks like a leader: "One community should give solidarity to another. It is really illogical to say, 'I'm gay and I'm into defending the gay community but I don't care about anything else…'."

In Pride, he is beautifully played by Ben Schnetzer with spontaneity, sweetness and swagger – a heartbreaker. Beresford says he was the hardest character to recapture, not least because: "In Wales, they still talk about Mark Ashton as if he were Joan of Arc."

In the homemade LGSM documentary, we also glimpse a tall, handsome fellow wearing groovy leather trousers, shaking a donations bucket outside Gay's the Word bookshop in London's Marchmont Street – this is Jonathan Blake. A small, bespectacled chap, busy with paperwork, is northern English leftie Mike Jackson, described by Beresford as a "keeper of the flame, then and now". Among the Welsh contingent, a young woman stands out – one of the stars of the homemade doc. She explains how the gay community educated the mining community: "Their struggle is similar to our own." This is Siân James, a young miner's wife, now MP for Swansea East. Beresford describes her as a "powerhouse, a highly intelligent working-class woman, an engine of social action".

And there is Dai Donovan, Welsh miner, courageous and open-minded, speaking with dignity at the 1984 benefit concert Pits and Perverts (the phrase was the Sun's, reclaimed by LGSM as a badge of honour. This was a wildly successful gig dedicated to raising money – £5,650 – for the miners, and starring Bronski Beat). Cliff, an older miner (in the film, a killingly funny and affecting Bill Nighy) appears in the documentary saying: "The lesbians and gays have been super duper."

LGSM members and miners dancing at the welfare hall in the Dulais Valley, Wales. Siân James (flowery dress) and Jonathan Blake (checked trousers) were key figures and are played in the film by Jessica Gunning and Dominic West. Photograph: People’s History Museum, Manchester/LGSM Archive

But because this was an amateur documentary, no names accompanied the faces. The credits, luckily, included an uncommon name: Reggie Blennerhassett. Beresford contacted him on Facebook and asked: were you involved in LGSM? Eventually he met almost everyone. Yet he knew he would also need an invented character. Joe (sensitively played by George MacKay) is a sixth-former, a suburban mouse discovering his sexuality (to cover for absences from home when he is with LGSM, he tells his folks he is doing a choux pastry course). "We needed a character who, like the audience, arrives bewildered at a Gay Pride march. What happens to him is like what happens to the straight audience – he mirrors the slight feeling of trepidation. It helps to have someone who does not know where he is going because an audience can think: neither do I."

Beresford was honest with all his interviewees from the Welsh mining community and from LGSM: "I'm a ruthless teller of stories. I told them this won't be a documentary." He argued – and they agreed – that the story was bigger than anyone in it. Now, because I'm about to meet some of the original people involved, I have to ask: how has the film gone down? He admits he was "incredibly frightened" before the first screening. But at the end there was stunned silence, applause, tears. Dai Donovan, visibly moved, asked: "May I speak?" He made "an extraordinary, moving speech. He said the time had come for them to thank us, as film-makers. He said, 'None of us believed this story would see the light of day. It is a document for the future, it exists for all time.'"

And then? "After that we all went and had a roaring piss-up."

After the strike, Mike Jackson felt "sad to think that when I died this history would be forgotten. The archive is in the People's History Museum, Manchester – but nobody would have known it was there". Now his eyes shine as he remembers the Welsh miners who came to London to march with Gay Pride in June 1985. "You could glimpse a wonderful revolution, that spark of the dream of people being together. The film gets that so right." Jackson says LGSM "changed my life, it is the proudest thing I've done. But I feel the same now, if anything more angry. I hate Margaret Thatcher as much as ever."

I speak to Blennerhassett – Beresford's key to the story – and his partner, Ray Aller, on the phone and they agree that being involved in LGSM was "the best time of our lives". They tell me they were paid extras in the film's final march: "We were costumed for the 80s. It was a stirring day to relive and many younger people were fascinated. One hope is that the film might revive political interest because the activism of the left has been sidelined, the trade unions are weak, gay rights issues aren't there."

Like many of those I interview, they say the film made them weep and they see it, in part, as a memorial to Mark Ashton. Blennerhassett says: "It is very hard to watch. When you see Ben playing Mark, it is like he has come back to life – it is unbelievable."

Dominic West as Jonathan Blake in the film Pride. Photograph: Nicola Dove

Jonathan Blake: LGSM member

Jonathan Blake, key member of LGSM. Photograph: Andy Hall for the Observer

I meet Jonathan Blake at Mike Jackson's flat and he brings along a black-and-white photo of himself dancing at the miners' welfare hall. We look at it together: he is leaning back, eyes closed, hands clapping. He is handsome, relaxed, basking in the moment. The miner's wife, Siân James, is to his left, staring directly at him, clapping too, looking as though she cannot believe her eyes. It was this image that inspired a dancing scene in Pride in which Dominic West really goes for it and climbs on the tabletops, wowing everyone in sight. It is brilliantly cut as the camera strays sideways from his dancing to stunned miners nursing their pints.

The real Jonathan is warm and bearish, with a mohican, chic specs, a scarlet fleece, hippyish brown leather shoes – loads of visual flair. "My trousers were pink and grey check," he says, looking at the photo. "I made them myself." He started as an actor but when that gave him up, as he puts it, he did a tailoring course at the London College of Fashion and went on to make costumes for ENO.

In the film, Jonathan is more actor than activist. Our first sighting of him is with fox fur and whistle outside Gay's the Word book shop. What does he think of Dominic West's portrayal? "Oh God, I love my screen character. I like to think he is me – he dances beautifully." I see the real Jonathan as less extrovert, more vulnerable and with a quiet charisma of his own. "The days in Wales were extraordinary," he says. "Who would think I would still be here to tell the tale?"

Jonathan was one of the first to be diagnosed with HIV in this country yet recently celebrated his 65th birthday. "I never thought I would get to 40 and now I have my pension, which is fabulous." The question everyone will want answered is how it is he is still alive? He believes he survived because he refused to be part of a trial in which some patients were given AZT, others a placebo. "I said, 'If this drug is so wonderful, why aren't you giving it to everybody?' At the time, I didn't care whether I lived or died. I knew I'd be dead in three months."

When he did not die, he had to live: "I tried to get my strength up but didn't want to face the world." It was meeting a new partner, Nigel, which changed his outlook and, through him, he joined LGSM. They are still together and recently had West and director Matthew Warchus to tea. Jonathan baked a lemon drizzle cake.

Jonathan and Nigel had recently been told by Stephen Beresford that in the film Jonathan would have a different partner to real life, Welsh Gethin (Andrew Scott). Nigel took it well; the real Gethin still teases Jonathan about it. The first time Jonathan saw the film was "difficult, because all I could think about was the people who had died". The second time, he could "settle in and enjoy it". For him, the most important thing is what the collaboration led to. "With the South Wales miners at the 1985 Labour party conference, we put gay rights on the agenda. The [resulting equality resolution] became the trajectory that would lead to civil partnerships and marriages. The NUM didn't want anything to do with poofs. But Dai [Donovan] put pressure on them – he was as good as his word."

Joe Gilgun as Mike Jackson in the film Pride. Photograph: Nicola Dove

Mike Jackson: co-founder of LGSM

Mike Jackson, co-founder of LGSM. Photograph: Andy Hall for the Observer

I have to admit that before meeting any of the real people involved, I had assumed they would be more ordinary than their on-screen incarnations. I am told by Pride's writer Stephen Beresford that Mike Jackson, co-founder of the LGSM, is the key to unlocking the story and has been his right-hand man. In the film, he is busy, radical, wears a beanie hat and is in love with the young, handsome Mark Ashton who, at one point, comes to his house calling from the street for "the Accrington sodomite" through a megaphone.

The last thing I expect is that on the evidence of the film and amateur documentary – 30 years old – I will recognise Mike immediately as he walks into our King's Cross rendezvous but, even minus the beanie, I do. Mike Jackson? "Yes," he says with a quick smile. I tell him Beresford has been raving to me about his beautiful garden – Mike teaches gardening to beginners, trained at Kew, has been doing it all his life, even during the miners' strike.

He comes from a working-class industrial family, is its greenest shoot – not many gardeners on his family tree. And quick as flash, he asks: would I like to visit as it is close by? And pretty soon, we are inspecting an incredible purple patch outside his front door with a rampant morning glory and, at the back, shared gardens by the canal in keeping with the community spirit that has defined his life.

Mike has a darting intelligence, a keen sense of humour. He remembers everything about the 80s. Does actor Joseph Gilgun have him right? "Have you any real perception of how people see you? I have no idea," he says. But his friends have told him: "He has got you to a tee." He talks about the megaphone scene where his character responds by telling Mark to come upstairs and sort flags. This is spot-on, evidently. "I'm a doer, not a talker," he says.

Yet he talks so well. You feel his indignation as he remembers how Thatcher's government "sequestered the funds of the NUM so miners couldn't get at their strike pay. It was unspeakable." Choosing to support the Welsh, of all possible British coalfields, he admits, was like "pinning the tail on a donkey" and, in real life, he did not ring to offer the Welsh miners LGSM's support as he does in the film – he wrote them a letter. But he remembers thinking: "God, I'd love to be a fly on the wall when they open it." He adds: "We weren't naive. Times were tougher for lesbians and gay men then. But you just go with it, don't you? A tougher climate means you have to be tougher. We were well used to homophobia."

It makes it all the more remarkable they were welcomed in Wales, although: "It would be dishonest to say there was no dissent. Years later, we found out there had been a meeting following my letter explaining a bunch of queers wanted to support them. It had led to a very heated discussion. But the consensus was: we have been demonised by the press, maybe we should meet the gay people because they've also been demonised. Those who had a problem with it were told to stay away. So we never encountered any hostility." It was not long before Welsh miners warmed to their cause: "They started wearing gay badges on their lapels. They wanted money because they were on strike; we wanted recognition and acceptance – not that we went with any preconditions, we did not expect anything back."

Then we talk about Mark Ashton. One day, during the writing of the film, Stephen Beresford turned up at Mike's flat: "He was extraordinarily cagey. And I said, 'Good God, what's the matter, Stephen? Spit it out.' And he said, 'Well, you and Mark… were you just friends?' I exploded with laughter. I said the man was beyond-belief lovable. He was beautiful, had a fantastic personality, was such a good friend, such a comrade. He was a whirlwind of a person, bright, mercurial, great fun. He could be argumentative but had this ability not to take himself too seriously."

Mike marvels at how times have changed for homosexuals in the metropolitan first world: "It is unbelievable, we have made such progress. Until I was 13, homosexuality was a crime – like making being black a crime. Nowadays, it is uncool for straight men to be disparaging about gay men."

Paddy Considine as Dai Donovan alongside Bill Nighy in the film Pride. Photograph: Nicola Dove

Dai Donovan: miner, now trade unionist



Dai Donovan, former miner and now a trade unionist. Photograph: Suki Dhanda for the Observer

I meet Dai Donovan on a summer afternoon in Cardiff at Bectu (the Broadcasting, Entertainment, Cinematograph and Theatre Union) headquarters – no surprise he is still a trade unionist. What strikes me about Dai is his courtesy, desire to be fair and melodious Welsh accent, like a boat on an up-and-down sea. In the film, Paddy Considine, who plays him, dresses conventionally in what looks like an M&S checked shirt. Straight as a Dai. And when he has to make a speech in a gay bar with a clientele whose look is more S&M than M&S, you fear for him – how is it all going to pan out? He hunches intently over the mike, honestly addressing his audience. On and off screen, Dai is genuine. He says: "Going to a gay club in London was definitely something I'd never envisaged doing." It must have taken courage? "Frankly, it didn't because one was mindful of being among friends and colleagues by extension."

When he gave a speech at the Pits and Perverts benefit, his exact words were: "You have worn our badge, Coal Not Dole, and you know what harassment means, as we do. Now we will pin your badge on us, we will support you. It won't change overnight, but now 140,000 miners know that there are other causes and other problems. We know about blacks and gays and nuclear disarmament and we will never be the same."

He reminisces about LGSM's first visit to Wales, telling how the minibuses got lost in the valleys and did not turn up until one in the morning. Twenty-seven gay people (in the film it is a dozen) slept on his floor – in the morning, his six-year-old daughter "couldn't put her foot down". Dai has met Considine only briefly and marvels at how he has "managed to convey the sentiments and instinctive personality I believe I have, the caring exterior. I am particularly grateful to him for capturing some characteristics of sincerity and gentleness my family suggests I have." Then he says: "Forgive me, that sounds…" He couldn't be less of a braggart.

Dai believes the film will go down well in the valleys and that people will view it with nostalgia "because those events did happen and they were part of them". He says: "It manages to reflect much of the politics of that time. Any industrial action is made of highs and lows, moments of intense sadness and intense laughter. But one of the characteristics of the south Wales mining community is a vivid sense of humour." He talks about how Welsh community is still strong, but he is under no illusions that pit closures did lasting damage. "A number of miners have never worked since. Many spent subsequent years trying to find meaningful employment."

His path has been different and remarkable. His search for an alternative after the strike led him to Ruskin College, Oxford, to read history. That must have been a culture shock? "It was terrible," he says, and adds that, on his first essay, an "eminent Oxford historian had written, 'This is a dog's dinner.' There were two ways to go after that, either give up or… " He went on to do a second history degree at Swansea before securing the Bectu job. It was the strike, he says, which gave him the confidence. Besides, giving up is not Dai's style.

Jessica Gunning, left, as Siân James, with Imelda Staunton in the film Pride. Photograph: Nicola Dove

Siân James: miner's wife, now Labour MP



Siân James, former miner's wife and now MP for Swansea East. Photograph: Suki Dhanda for the Observer

The coffee lounge of the Grand hotel, Swansea, is deserted until Siân arrives. Warm, lively, boundlessly intelligent, she talks for Wales – in every sense. She is Labour MP for Swansea East, the first woman to win the seat. She wears a regatta-style blazer, has a boyish haircut and natural presence. She is one of Pride's most powerful stories: a miner's wife who speaks out.

"I'd married at 16. At 20, I had two children and was happy as a housewife and young mother. As long as my lace curtains were the cleanest, my children immaculately dressed, their hand-knitted clothes made with love, I was happy. Then along came the strike and all the things I'd thought about before getting married – such as getting A-levels – returned." She had found her voice in the miners' strike and now people were telling her: you can't stop. "What you have to say is as valid as what other people have to say. Why should my take on the strike be inferior to Ian MacGregor's, Arthur Scargill's or Margaret Thatcher's?"

During the strike, Siân helped feed 1,000 families a week, in nine centres across three Welsh valleys. She remembers the lively arguments about bare necessities: "The women all said sugar was a luxury, all the men said it was a necessity." But it was not until Thatcher's description of mining families as the "enemy within" that something changed inside her. She took it personally. "I was very offended. I couldn't see I was an enemy within. I was just someone trying desperately to save their community. Couldn't anyone else see that?"

She is the daughter of a trade union family; her mother was a shop steward, her father an active member of the NUM. And it was not long before she and feisty Hefina in a tour de force performance became spokeswomen for their community. The real Hefina died during the making of the film. "I adored her," Siân says. "This was a person who had community at the heart of everything she did."

Siân is honest about the community's initial uncertainty about LGSM. They were used to visiting supporters – Belgian journalists, Swiss trade unionists, Americans – but they had no clue what to expect. "I never saw any antagonism. What we thought was that this was a new group of people. We knew gay people existed – my dad worked with a miner who was gay – but nobody openly talked about it; it was considered very personal. There was an uncertainty about how these people would be different and whether we would have to modify our behaviour. Would they expect us to talk about things, ask them questions? And they were bloody vegetarians! This fazed us far more."

After the strike, "for the first time, people were interested in what women had to say". And so Siân took A-levels, did a Welsh degree at Swansea, worked for the students' union, was a fundraiser for Save the Children, became a director of Welsh Women's Aid and was selected as an MP. She is mindful of how much employment has changed since the pit closures. "Every day, somebody in my constituency asks: when is manufacturing coming back to Britain?" She tells them it is a post-industrial society, the landscape changed for ever. "The jobs available in Swansea East are different – a lot are in the service sector. That is not to demean service sector jobs, but some of them are minimum wage with zero-hours contracts and those are challenges for politicians."

Siân was "apprehensive" before watching the film but from "the moment the credits started to roll, we were enthralled, we were bang! back into it…" Jessica Gunning's performance, she enthuses, is phenomenal. "She even caught my mannerisms. I've a habit of standing with my hands linked across my stomach I'd never noticed before." But it is the film's message Siân celebrates above all. "It doesn't matter what colour, sexuality or creed you are, there will always be a common thread." And she exclaims: "We wanted this so much – we have waited 30 years for this story to be told."

Pride opens at cinemas on 12 September

