It has long seemed that the original movie musical—apart from those of the animated Disney variety, of course—had gone the way of the dodo. Sure, there is the occasional adaptation of a Broadway smash, but even they have mostly tanked (“The Producers”? “The Phantom of the Opera”?), and live-action attempts to replicate the Astaire-Rogers formula, or the Vincent Minnelli MGM model, pretty much died after “Gigi,” with bombs like “Thoroughly Modern Millie” and “Star!” in the late sixties sealing the grave. Even Disney came a-cropper with “Newsies,” which succeeded in a later Broadway incarnation but flopped badly when it was released in 1992, and when Herbert Ross broke the mold in 1981 with a sort of anti-musical musical, “Pennies from Heaven,” the result was a masterful film that was a disaster with the public.

That’s reason enough to cheer “La La Land,” Damien Chazelle’s modern-day nostalgia trip that takes us back to the days when singing and hoofing on screen wasn’t considered a total anachronism, with an original score by Justin Hurwitz (music) and the team of Benj Pasek and Justin Paul (lyrics). It must be said, however, that the inspiration here doesn’t seem so much Hollywood musicals of yore as the cream-colored attempts of French director Jacques Demy to emulate them in his two 1960s pictures, “The Umbrellas of Cherbourg” and “The Young Girls of Rochefort.” The swooning, cotton-candy, luxuriantly pastel vibe adopted from them has a rather effortful feel, but for those old enough to remember the halcyon days of film musicals, it will be a treat.

The effortful quality is accentuated by the film’s stars, both of whom are game but obviously struggle with the demands of the songs and the choreography. That sense of discomfort, however, is to some extent a part of the narrative, in which each is striving after a dream that seems impossible to achieve, while both have to deal with obstacles threatening their romance.

Of course, they first have to find one another, and that’s the function of the first act. Their initial meeting is a transient one, as Sebastian (Ryan Gosling) and Mia (Emma Stone) are introduced stuck in traffic on a Los Angeles freeway ramp. But the gridlock serves as the occasion for the film’s first musical set piece (and one of its best), as drivers jump out of their cars and engage in an exuberant paean to the winter weather in California, “Another Day of Sun.” It’s not exactly an idyllic encounter for Sebastian and Mia, however: he’s annoyed when she dallies in front of him as the traffic flow resumes, and they exchange nasty gestures.

As they go their separate ways, we learn more about each. He’s a pianist who adores classic jazz and dreams of reestablishing an old club as a temple to the music; meanwhile he has to accept any gig he can find, however unfulfilling, like playing upbeat pop turns at a restaurant managed by Bill (J.K. Simmons). She’s a barista at a diner on a studio lot, but is of course an aspiring actress, though her auditions all end disastrously. The two meet again, though once more briefly, when after going to a party with her roommates, she leaves early and, walking home, hears the music coming from the restaurant. She goes in to compliment Sebastian, but having just been canned by Bill for playing one of his own pieces, he brushes her off rudely.

Just as it seems they’ll never link up, there’s a third meeting, at a pool party where Sebastian has gotten a gig as a keyboardist, and it turns out to be the charm. After the party he and Mia walk to a bluff overlooking the moonlit city and do an old-fashioned soft-shoe (“A Lovely Night”). That leads Sebastian to seek Mia out at the diner and ask her out; and their date winds up at the Griffith Observatory, where they share an even more magical moment (“Planetarium”).

From that point on the romance heats up, but naturally speed bumps occur, as Sebastian accepts an invitation to join a pop-oriented jazz band that becomes a huge success and keeps him on the road touring, while Mia, after deciding to abandon her dream and go home, gets an offer that makes her a star. Can their relationship survive their very different professional demands? You’ll need to see the film to find out, but one of the pleasures of Chazelle’s screenplay is that it doesn’t merely follow tradition but takes some unexpected turns; it aims to be both a tribute to old-fashioned musicals and a modern response to them.

That dual purpose might be too much for “La La Land” to bear, but there’s no doubting the commitment of Chazelle, his stars and his crew to it. Kudos to Hurwitz, Pasek and Paul for producing a score that, while not instantly memorable, fits comfortably into the narrative, and to Gosling and Stone, especially for their duets, though the solos—like Stone’s “Audition”—also have their charms. They also manage Mandy Moore’s appealingly retro choreography. The supporting cast, including Simmons, handle their modest responsibilities well, but the real co-stars are the behind-the-camera crew—production designer David Wasco, costumer Mary Zophres and particularly cinematographer Linus Sandgren, who together have crafted a luscious-looking confection, which editor Tom Cross helps to move gingerly—at least until the final act, when the tempo slows.

It’s hard to imagine that “La La Land” will lead to a resurgence of screen musicals; its great strength lies in a combination of novelty value and gleeful execution that won’t be easily replicated. But its uniqueness makes it all the more noteworthy, and all the more delectable for it. To enjoy it, however, you have to be willing to surrender yourself completely to fantasy: after all, Sebastian spends the entire film driving around Los Angeles in a vintage Buick convertible that he doesn’t even bother to lock whenever he parks it (top down, of course)—but it never gets stolen.

Now there’s a fantasy for you.