Like many millennials, Himesh Patel wasn’t particularly well-versed in The Beatles as a kid. “They weren’t a huge part of my life, like they are now,” says the 28-year-old British star of the new musical comedy “Yesterday,” about a world in which The Beatles suddenly don’t exist.

“At school, we did a ’60s thing once and they put on ‘I Saw Her Standing There’ and ‘Twist and Shout,’ ” said Patel, who went on to discover the psychedelic “Sgt. Pepper’s Lonely Hearts Club Band” album in his mid-teens. But even for people who don’t think of themselves as fans of the band, he says, “The Beatles kind of pervade everything. They’re always kind of part of everyone’s lives.”

This is the jumping-off point for “Yesterday,” in which Patel plays Jack, a struggling singer/songwriter who skyrockets to global fame after — following a momentary supernatural flicker and bike accident — The Beatles never happened. Except, that is, in Jack’s memory.

Patel’s living his own new-level-of-fame trajectory, going from a long-running part on the British soap “EastEnders,” which he started at 16, and a handful of theater roles to being the face of the new movie from director Danny Boyle (“Slumdog Millionaire”) and writer Richard Curtis (“Love Actually,” “Bridget Jones’s Diary”). “They’re very different,” says Patel, “but what draws them together is the romance in both of their movies. Richard is so fun, and Danny’s always got a smile on his face while he’s working. I don’t think either of them sat down for the entire three months we were shooting.”

Patel, who does his own singing in “Yesterday” and had to learn some serious guitar skills for the film, says one of his co-stars was especially stressful to play for — at least, in the runup to the performing. “It was initially a bit nerve-wracking, before I met Ed [Sheeran],” Patel says. “And then you find he is the nicest, most down-to-earth stadium-filling rock star there probably is. He doesn’t come with an entourage; he’s such a normal guy.” Sheeran stole time away from a UK tour to play a version of himself in “Yesterday” (albeit a version who thinks “Hey Dude” is an improvement on the Lennon-McCartney classic).

The singing gig marks a return to Patel’s younger years, when he was in youth theater growing up in Cambridgeshire, about 60 miles north of London. His parents moved to the UK from India and worked as postmasters and ran a newspaper shop.

He returned to musicals in 2016 with a spur-of-the-moment trip to the Edinburgh Fringe Festival. “One of my best friends and his musical troupe were doing this original production of ‘The Hunchback of Notre Dame,’” says Patel. “He said, ‘If you want to come along, you can play a pigeon or a bell.’ ” (Patel gamely played both.)

He’s taking a left turn with his next project, “Avenue 5,” the new HBO series from “Veep” creator Armando Iannucci. It’s set on a spacecraft, and Patel plays the ship’s stand-up comedian.

But for the moment, he’s still enjoying being in that lovely Beatles headspace. “Recently, I’ve not been able to get ‘Because’ [from “Abbey Road”] out of my head. It’s really been stuck,” he says. “The songs follow me around on the press tour, every time I think of the movie. But I don’t ever get sick of them.”

He’s been touched by audiences’ emotional reactions to the film, starting with its debut at the Tribeca Film Festival, where Patel performed a live song after the screening. “I think people realize [the band] means so much to them, even if they didn’t know it,” he says. “And in the rediscovery there’s joy and hope and just . . . togetherness. I think that’s something we might need reminding of.”