Benj Pasek, who co-wrote with Justin Paul the music and lyrics for this brilliant hit musical Dear Evan Hansen, was a student at Friends Central High School when a painful series of events happened — including the suicide of a student. Those events in the year 2000 — tweaked and honed — are the basis of this heart-wrenching and gorgeous show. Steven Levenson wrote the book and Michael Greif directed with remarkable sensitivity and specificity.

The plot:

Anxious and self-deprecating and wincingly shy, Evan Hansen (played by the extraordinary Ben Platt — greeted by girlish squeals when he arrives onstage) wrote a letter to himself as an exercise in cheerfulness proscribed by his therapist. As it emerges from the printer in the computer lab, Connor Murphy (Mike Faist), snatches it and keeps it. Connor is one of those morose, dangerous-looking teenagers ("school shooter chic"), and he is found, three days later, a suicide with the letter in his pocket. It's one of those misunderstandings that takes on a life of its own, as everyone assumes Connor wrote it to his best friend Even Hansen.

Lie compounds lie as Evan embellishes the idea of their fantasy friendship, imagining himself less lonely than he is.  The rich Murphys begin to treat Evan as a surrogate son: the grieving mother (Jennifer Laura Thompson), the angry father (Michael Park) and their daughter Zoe (Laura Dreyfuss) on whom Evan has a tremendous, tremulous crush.  Evan's mother (Rachel Bay Jones) — a struggling single parent — discovers she has been betrayed and abandoned by a son who wanted the family life she could not/had not provided and is both guilty and outraged.

The letter — and others fabricated by an ultra-ironic student named Jared (Will Roland) — goes viral and social media takes over. Another lost teenager, Alana (Kristolyn Lloyd), who substitutes ambition and lines on her college applications for genuine emotion, creates The Connor Project, as everyone falsely claims a relationship with Connor in an attempt to make themselves part of something larger and more important than their senior-in-high-school lives.  "Connor's death gives them the gift that they matter."

The songs, all smoothly inserted into the narrative in a kind of musical hyper-realism, all have a kind of dramatic urgency, whether ballads or fugues. "Waving Through a Window" wonders if anybody is waving back  (a terrifying Stevie Smith,"I'm not waving, I'm drowning" moment), and the soaring song of hope, "You Will Be Found" is the musical promise for all these lost kids.

The dazzling set designed by David Korins, enhanced by Peter Nigrini's projections, creates a dark, looming presence with tweets and instagrams and emails scrolling down. Evan's little bed, sneakers neatly by the side, is overwhelmed by this huge blue internet world.

The entire company's performances are pitch perfect, but Ben Platt is, simply, astonishing: he can sing with tears streaming down his cheeks and his nose running; every gesture — as his hands reach out and quickly withdraw, as he plucks as his cast, and at his clothes — is simultaneously perfectly calibrated to create character and absolutely natural and believable. His voice moves from octave to octave, and from plaintive to sorrowful to tentatively joyful.

Overheard after the show: A young man earnestly asks his father who is sitting behind me: "Didja cry, Dad? Didja cry?"

A young woman flings her arms around a young man, obviously her brother, and says, "I love you."

For every weeping parent, for every lonely teenager, Dear Evan Hansen is the show that gets it painfully, beautifully right.

And for every lover of musical theater, this show gets it thrillingly right. If you can get a ticket, go!

Music Box Theatre, 45th St., New York.