The godlike genius of Stephen Sondheim is now so generally acknowledged that it's easy to forget how daring his shows once seemed – and how they struggled to find wide public acceptance.

Follies is a case in point. When it opened on Broadway in 1971, it lost a whopping $792,000. Audiences were restless and confused, some critics were baffled and even though it was laden with awards it closed after 522 performances. It was 16 years before it even opened in London and was substantially reworked in the process. (Indeed, the writer James Goldman continued to tinker with the book for years.)

The value of Dominic Cooke's perceptive production for the National Theatre, which returns to the original book, is that it establishes the greatness of Follies once and for all thanks to four illuminating and dazzling central performances and a thoughtful approach which strips back familiar songs to reveal them in different lights.

The show is set in the year it was written, when a group of middle-aged women who were once the beautiful stars of the Weismann Follies assemble for a reunion, accompanied by their families and their memories. The girls they once were emerge from the entrails of the dilapidated theatre to stalk the action like so many glittering ghosts.

As Weismann says this is their final chance "to glamorise the old days, to sing a few songs, and to lie about ourselves a little." And that is exactly what they do, recreating the songs they once sang in a series of elaborate yet mournful pastiches of a golden age of theatre. Yet these songs are intricately bound up with another set of songs, which tell the story of two failing marriages: that of Ben and Phyllis and Buddy and Sally, former friends who paired up when the men were suitors to the chorus girls upstairs.

Cooke emphasises – on occasions over-emphasises – this dual structure, the constant intrusion of the past into the present. Sometimes Vicki Mortimer's crumbling, revolving set seems stuffed to bursting with the characters and their younger selves. In doing so, he makes it clear how every song in Follies is full of regret.

The production seems to minimise the opulence of the original Follies. Perhaps deliberately, choreographer Bill Deamer downplays the sheer razzle dazzle of routines such as "Who's That Woman?", where the old hoofers put on their tap shoes for one last outing. Nor do the ghosts in their plumed headdresses have the straight-legged strut that makes their sex appeal seem real. Their allure is fragile, as much an illusion as Sally's dreams of happiness with Ben, or Phyllis's longing for her freedom.

Its strength lies less in its spectacle than in the calibrated detail of every single performance, the way each turn in the spotlight becomes an admission of self. Tracie Bennett turns "I'm Still Here" into a conversational confession as much as an anthem of survival; in Di Botcher's hands, "Broadway Baby" is a wry look back by a woman in a trouser suit; Josephine Barstow makes "One Last Kiss" a soaring ballad of longing.

Nowhere is this dramatic truthfulness more vivid than in the playing of the central quartet. As Sally, Imelda Staunton initially enters as a bubbly, disappointed housewife; as the show progresses, in songs such as "In Buddy's Eyes" and "Losing My Mind", she coruscatingly portrays the demented desolation that lies beneath. Peter Forbes finds similar pain in the tragedy of the awkward Buddy's devotion to a woman who can never love him.

As the urbane Ben, Philip Quast combines a glorious singing voice with a rising sense of desperation as he realises the waste of his own life, while Janie Dee is sensational as the sardonic, cynical Phyllis, hiding her misery behind her wisecracks. Her two numbers – "Could I Leave You?" And "The Story of Lucy and Jessie" – deservedly bring the house down.

Follies may not be an uplifting musical and it's certainly not a perfect one. But in its devastating picture of the way the dreams of youth turn to the bitterness of age, it is a truly terrific one.

Follies runs in the Olivier Theatre at the National until 3 January.