It starts with a traffic jam, a sweltering ribbon of frustration on a Los Angeles freeway. All of a sudden, a melody emerges from the squalling of horns and the cacophony of competing radio stations, the commuters leap from their cars, and a big, brazenly sincere movie-musical song-and-dance number is underway.

An early verse, sung by a chipper young woman in a yellow dress, is a kind of overture, hinting at the theme of the bittersweet fairy tale to follow. She recalls leaving her hometown boyfriend behind to pursue fame and fortune here in La La Land, a quaint old nickname for Los Angeles that is also the name of Damien Chazelle’s charming new movie.

Video

Damien Chazelle narrates a sequence from his film featuring Ryan Gosling and Emma Stone.CreditCreditLionsgate

The ingénue in the yellow dress will vanish from the story, which is concerned with the entwined romantic and creative doings of an actress named Mia (who is behind the wheel of a Prius) and a jazz pianist named Sebastian (who is pushing a shiny crimson beater). The kicky opening sequence serves as an audition piece, a mini-“Chorus Line” acquainting us with the crowd from which these two gorgeous faces will emerge. Mia’s face belongs to Emma Stone, Sebastian’s to Ryan Gosling, so you know what I’m talking about.

But even though they’re played by movie stars, Mia and Seb (as he’s sometimes called) have a long way to go. They are still swimming in a teeming pool of strivers and seekers. Every car from Glendale to Santa Monica holds an aspiring artist or performer of some kind or other. If they shared their rides, the commute might be easier and the smog less heavy, but of course part of the point is that each one makes the trip alone.

That first song, one of a bouquet of compositions written for the movie by Justin Hurwitz, with lyrics by Benj Pasek and Justin Paul, is called “Another Day of Sun,” and it is the movie’s way of auditioning for the audience, testing our tolerance for a bold blend of nostalgia and novelty. Can a generation raised on “Glee” and the “High School Musical” franchise and besotted by newfangled stage musicals like “Book of Mormon” and “Hamilton” find room in its heart for a movie that unabashedly evokes “The Young Girls of Rochefort” and “An American in Paris”?

Why not? Mr. Chazelle, whose previous features (“Guy and Madeline on a Park Bench” and “Whiplash”) were full of music and brash, youthful energy, is a natural showman and a canny craftsman. He wears his influences on his sleeve, but he wears them lightly. For all its echoes and allusions, “La La Land” is too lively and too earnest for mere pastiche. It doesn’t so much look back longingly at past masters like Vincente Minnelli, Nicholas Ray, Stanley Donen and Jacques Demy (to name a few) as tap into their mojo, insisting on their modernity and its own classicism in the same gesture.

Mia and Seb are throwbacks — if not quite to Ginger and Fred then surely to Judy Garland and Mickey Rooney or Cyd Charisse and Gene Kelly — but they are also citizens of the present. They are better at acting than the other stuff, able to express emotion in nonmusical scenes with candor and conviction, but a little stiff-limbed and wobbly-voiced when the moment arrives for hoofing and chirping. In this, they’re pretty much the opposite of those earlier performers, who were vaudevillian troupers before they were thespians.

Seb’s fussy jazzman antiquarianism is, in any case, an entirely plausible millennial affectation. His vintage car has a cassette deck in the dashboard, and he lives in a shabby apartment amid stacks of vinyl records and old concert posters. His prized possession is a piano stool that supposedly once belonged to Hoagy Carmichael, and he’s upset when his unsentimental sister (the great, all-too-briefly seen Rosemarie DeWitt) sits on it.

Image

Emma Stone and Ryan Gosling in this film, which explores the old conflict between love and ambition.CreditDale Robinette/Lionsgate

In his approach to work, Seb is a proud purist, perpetually oppressed and affronted by the prospect of compromise. To pay the rent, he is obliged to take what he regards as demeaning gigs: tickling out Christmas carols and show tunes at a restaurant (the manager is J. K. Simmons, the fearsome Oscar-winner from “Whiplash”); doing ’80s pop hits with a knowingly cheesy cover band; touring with a combo fronted by an old friend who has made it big.

That friend, Keith, is played by the real-life R&B star John Legend, whose affable participation presents an interesting challenge to Seb’s dogmatic traditionalism. It seems doubtful that Mr. Legend would have shown up to perform music that he thought was bad, and Keith’s unapologetic commercialism is less a strawman for Seb’s high-mindedness than a plausible counterargument. The difference between selling out and breaking through is not always clear, and “La La Land” is not so hypocritical as to pretend otherwise.

This is especially true in Mia’s case. She works as a barista at a coffee shop on the Warner Bros.’ lot, dashing off to audition for small roles in dubious films and television shows. But, of course, the line between art and junk is also blurry, partly because to qualify for the junk you must be absolutely dedicated to your art. Which Mia is, in a way that magnifies Ms. Stone’s extraordinary discipline, poise and naturalness.

Image

Commuters caught in a Los Angeles traffic jam break into song and dance in a scene from “La La Land.” CreditDale Robinette/Lionsgate

The real tension in “La La Land” is between ambition and love, and perhaps the most up-to-date thing about it is the way it explores that ancient conflict. A cynical but not inaccurate way to put this would be to describe it as a careerist movie about careerism. But that would be to slight Mr. Chazelle’s real and uncomfortable insight, which is that the drive for professional success is, for young people at the present time, both more realistic and more romantic than the pursuit of boy-meets-girl happily-ever-after. Love is contingent. Art is commitment.

As moviegoers, we might prefer not to choose, and in this case we don’t really have to. “La La Land” succeeds both as a fizzy fantasy and a hard-headed fable, a romantic comedy and a showbiz melodrama, a work of sublime artifice and touching authenticity. The artifice lies in the gorgeous colors, the suave camera movements and the elegant wide-screen compositions. In the songs and choreography too, of course, though it has to be said that, with one or two exceptions, these are more competent than dazzling. You’re more likely to remember what you saw than what you heard.

The naturalness comes from the stars, and from the filmmaker’s disarming infatuation with the place apotheosized in song as the “City of Stars.” Taking his place in a long tradition of besotted Easterners, Mr. Chazelle (from New Jersey by way of Harvard) can’t stop looking up at the palm trees silhouetted against the evening sky. The four chapters that track the changing seasons are a sly joke about the weather, which is always perfect. The magic hour — that purple-and-orange twilight cherished by generations of cineastes — seems to last for weeks on end. The Griffith Observatory might as well be heaven itself.

Like a capable bandleader or stage illusionist, Mr. Chazelle knows how to structure a set, to slacken the pace at times in order to build toward a big finish. He memorably pushed “Whiplash” to a complex and thrilling musical climax, and he outdoes himself in the last 20 minutes of “La La Land,” and outdoes just about every other director of his generation, wrapping intense and delicate emotions in sheer, intoxicating cinematic bliss.

The final sequence — one last audition, followed by a swirl of rapturous, heart-tugging music and ballet — effectively cashes the check the rest of the movie has written. On first viewing, for the first 90 minutes or so, you may find your delight shadowed by skepticism. Where is this going? Can this guy pull it off? Are these kids going to make it? Should we care? By the end, those questions vanish under a spell of enchantment.