LONDON — Over two and a half seasons on “Barry,” Sally Reed, the aspiring star played by Sarah Goldberg, has become one of the most complex characters on television, inviting both sympathy for her Hollywood struggles and contempt at her overweening self-absorption.

In Sunday’s episode, this empathy whiplash was in full effect. Overwhelmed with emotion onstage at the premiere of her new show, “Joplin,” Sally is an image of hard-won triumph. But her treatment of others leading up to that moment — she admonishes her friend turned assistant Natalie (D’Arcy Carden) for speaking in a meeting, demands that her carrots be cut just so and refuses to let Natalie ride with her to the premiere — illustrates how success has amplified some of Sally’s worst tendencies.

“We’ve seen her bullied, and now she has a small piece of power,” Goldberg said in a recent interview. “I’m so endlessly curious about what people do with power.”

We also saw Sally shake up the show, ending what had become a toxic relationship with Barry, the assassin protagonist played by Bill Hader. This subplot, too, was finely layered, with Sally’s initial denial giving way to defiance in a way that perhaps reflects her past experience in an abusive marriage, discussed in earlier episodes.

The showrunners say it was Goldberg herself who turned Sally, who was originally conceived as a more straightforward love interest, into a person of such complexity.

“When we wrote it, it was a thing you’ve seen a hundred times,” said Hader, who created “Barry” with Alec Berg. “When Sarah read, it changed our view of the character in a very positive way, like, yes, this should be more of a complicated person.”

The role has brought Goldberg, 36, an Emmy nomination as well as more informal honors that speak to Sally’s mash-up of heart-rending and infuriating qualities. (Refinery29 once called her, approvingly, “TV’s least likable woman.”) But in conversation, Goldberg’s affinity for her character is clear.

“I empathize with Sally; I’ve met a million Sallys,” she said. “I think she had a tough life and had a big dream.” Which isn’t to say she approves of how Sally chases that dream.

“Her tunnel vision is so extreme that she’s not absorbing anything around her,” Goldberg said. “And if you get into that space, well, what are you bringing to your work?”

It’s an unSally-like way of thinking about acting that goes some way to explain why Goldberg, who is Canadian, left New York for London during the uncertain days of Summer 2020. She loves London for, among other things, the sense of perspective it gives her.

“Acting is treated here a lot more functionally, a bit like a plumber,” she said. “I know I’m not saving lives, and I think London helps you keep that in check.”

Sitting in an eccentrically decorated Georgian townhouse hotel near the center of the city last month, Goldberg was warm and engaging in conversation. Her accent often slipped into a slight British lilt, common among North American expats, and her speech was peppered with Britishisms. (She referred to television as “telly” more than once).

The move here was a homecoming of sorts; Goldberg spent most of her 20s in London. “I’m a London gal once again,” she said, “and I’m here to stay.”

Goldberg, who was born in Vancouver, discovered acting at a young age and was motivated by a beloved high school drama teacher to apply to theater school. A self-described “precocious” teenager, she applied only to Juilliard and the National Theater School of Canada. After she was rejected from both, she spent a year backpacking across Europe. Her first stop was London, where she had an “epiphany” outside of the British Museum.

“I just thought, I need to live here,” she said. “Something sort of overwhelmed me.”

Not long after returning home, she made it happen. She auditioned in Seattle for the London Academy of Music and Dramatic Art, Britain’s oldest drama school, and got in — she spent the next three years there studying everything from Chekhov to flamenco. (LAMDA alumni include Benedict Cumberbatch and David Oyelowo, among others.)

After graduation, she had what she described as a “few lucky moments” in the London theater world, including earning an Olivier nomination for her performance in Bruce Norris’s Pulitzer Prize-winning play “Clybourne Park” at the Royal Court Theater. She also found work in New York, reprising her role in the Tony-winning Broadway version of Norris’s play and starring opposite a young Adam Driver in an Off Broadway production of John Osborne’s “Look Back in Anger.”

Though Goldberg’s heart has always been in theater, in her late 20s it became apparent that in order to earn a living — and, perversely, land more theater roles — screen acting was a necessity. The transition, she found, was not an easy one.

“I always felt that I didn’t understand the mediums of film and TV,” she said. “I was always very nervous in front of the camera. It took me a long time to learn how to work with that piece of machinery in such close proximity.”

After a number of small roles in films and series, Goldberg landed her first substantial TV job in “Hindsight,” a 2015 VH1 time travel comedy.

“It was my first time on camera, every day, five days a week, 17 hours a day,” she said. “It was a really great training ground, where you’re too tired to be nervous.”

“Hindsight” didn’t last long — after initially being picked up for a second season, the production was bought out by the network, and the show was canceled. But the money Goldberg, then approaching 30, received from the buyout paved the way for two firsts in her life: a savings account and the power to turn down bad parts.

“It was really liberating to say no to any number of poorly written pilots where the female characters are there to ask questions and give exposition,” she said. Then along came “Barry.”

“I read the script and it was just so unusual; the tone was so original,” she said. Goldberg thought Sally had a hidden depth. “They sort of Trojan Horsed her in as the typical girlfriend role, seemingly sweet as pie, small town girl, perfect teeth,” she said. “We very quickly undercut it with her true colors, which are much more complex and morally bankrupt.”

The creators credit Goldberg with elevating the role, partly by being unafraid to be off-putting. “Sarah has always pushed us to make the character real and complicated,” Berg said. “Even if it makes her less ‘likable,’ whatever that even means.”

Hader described Goldberg as an agile and creative performer who has become a valued collaborator — when he is writing episodes, he occasionally calls her to hear what she thinks about his plans for Sally.

“I trust her instincts,” he said. “She’s a very good writer, so people who have that, you want to bring that into it.”

Henry Winkler, who plays the acting teacher Gene Cousineau, also lauded Goldberg’s wide-ranging creativity. “Sarah is the real deal,” he said on a video call.

“She’s an improviser, she’s a writer,” he added. “She thinks like a stage actor in the detail of how to piece together the puzzle of that person.”

Goldberg’s next project will see her direct those abilities and instincts into something of her own, a dark comedy series called “SisterS” that she has spent six years writing with her best friend and former LAMDA classmate, the Irish actress Susan Stanley. Filming is set to begin this summer.

Goldberg’s early reservations about television have given way to a genuine appreciation for the medium. “The up close and personal ability of the camera means you have access to vulnerability and performance that’s hard to capture in a large theater,” she said. If that makes it easier to embody a woman who is equally adept at charming and infuriating viewers, sometimes within the same scene, so much the better.

“I hope that with Sally there are moments when we’re rooting for her, and there are moments when we’re repulsed by her,” Goldberg said. “Because that’s the gray area of life.”