Sitting in the Library Center Theatre at the Sundance premiere of her new film, “The Kindergarten Teacher,” in January, Maggie Gyllenhaal was enjoying herself right up until the point where she felt the audience turned on her character.

The shift came during a scene in which Gyllenhaal’s caring, creatively starved kindergarten teacher asks a gifted, 5-year-old student about the source of his poetic inspiration. The boy’s answer produced a burst of intense laughter from that Sundance audience in Park City, Utah, that pained Gyllenhaal — so much so that her mother, seated next to her, leaned over and asked if she was OK.

Nine months later, enjoying the sunshine and a custom-made Caesar salad (substitute vinaigrette, add avocado) at an outdoor Beverly Hills cafe, Gyllenhaal says she has gained a little perspective on the moment. She loves that “The Kindergarten Teacher” (currently in select theaters and streaming on Netflix) produces passionate, vocal reactions from those who see it. But she still remembers that it felt like “being punched in the stomach” when the Sundance audience chortled the way it did.

“The laughter was like, ‘I was never on your side,’ which is not true,” Gyllenhaal says. “The whole movie is designed so that you are on her side. She could be your friend. She’s a wonderful teacher and warm, and a compelling artist even. And then there comes a time in the movie when you’re like, ‘Whoa. Wait. I was rooting for her?’ Then you have to question yourself. ‘What about me allowed me to be on this side of this woman doing these really problematic things?’”

Part of the reason for that empathy, of course, is Gyllenhaal, who, over the last couple of decades, has played a number of complicated women existing on life’s edges. (Clear-headed Candy, the sex worker and porn director on the current HBO drama “The Deuce,” is but one.) Asking audiences to look at these characters and see their humanity and, by extension, the dark places within themselves, has become Gyllenhaal’s calling card.

When Gyllenhaal went on “The Daily Show” to talk about “The Kindergarten Teacher,” Trevor Noah hadn’t seen the film, only the trailer, and asked, “Is it a thriller? An intimate movie about a woman’s mind? A horror movie?” Gyllenhaal’s answer is the reason she signed on board, both as an actor and producer: “It’s all of them.”

Advertisement

Parker Sevak and Maggie Gyllenhaal in "The Kindergarten Teacher."

(Netflix)

Lisa, the film’s titular teacher, is, at heart, an artist, though there isn’t much room for the sublime in her life. Her husband doesn’t understand her, and her connection with her teenage children grows more tenuous with each eye-rolling day. To stave off the mundane, she travels from Staten Island into Manhattan for a weekly poetry class where her work is met with indifference and sometimes outright contempt.

Lisa’s life changes when one of her kindergartners spits out a transcendent poem after class. He’s gifted, and Lisa becomes obsessed with him. She wants to develop and protect his talent. But the ways she goes about doing this are problematic and, as the film progresses, kind of terrifying.

Certainly, other actresses could have played Lisa, but few could have handled the character’s journey into darkness with such sensitivity. Writer-director Sara Colangelo, who based “The Kindergarten Teacher” on a 2014 Israeli movie of the same name, says she instinctively knew this from watching Gyllenhaal’s work in projects like “Secretary,” “Sherrybaby” and “The Honourable Woman.” Colangelo was looking for an actor both relatable and capable of moving in extreme, bizarre directions.

“I always feel challenged when I watch Maggie,” Colangelo says by phone from New York. “And I knew that playing Lisa, a woman bulldozed by her life and maybe by the time we’re living in, would provide a challenge.”

That reference to current times resonates deeply with both Gyllenhaal and Colangelo, who see “The Kindergarten Teacher” as both an allegory and cautionary tale about what happens when you starve a vibrant woman’s mind. Gyllenhaal recognized in Lisa her own experiences as a woman and appreciated that she wouldn’t have to make the little switch that actresses are often asked to do: Find a way to dovetail their feminine perspective into a fundamentally masculine story.

“As a woman artist, you’re always bending over backwards to fit into something that isn’t natural to fit yourself into,” Gyllenhaal says. “I didn’t have to do that with this film. I didn’t have to dig it out. There was a magnetic pull inviting me in. That’s rare. Really rare.”

Maggie Gyllenhaal in the second season of "The Deuce."

(Paul Schiraldi / HBO)

Advertisement

Recently, though — it began with her role as an accomplished but deeply conflicted Anglo-Israeli businesswoman in the 2014 limited series “The Honourable Woman” — Gyllenhaal has been finding more and more projects that speak deeply to something inside her. She can’t quite put the feeling into words. But while making “The Honourable Woman,” she says she arrived at a point that didn’t feel like a point. It felt like a new beginning. And through “The Kindergarten Teacher” and two seasons of “The Deuce” (she’ll return to shoot a third and final season in February), she hasn’t looked back.

Between promotional appearances for the film and the HBO series, Gyllenhaal has been writing a screenplay adaptation of Elena Ferrante’s “The Lost Daughter,” which she plans to direct. It’s an unsettling and unflinching thriller about a middle-aged divorced woman who turns inward after meeting a young mother and her daughter while on vacation.

It’s also a probing look at self-identity, femininity and motherhood, and Gyllenhaal has been considering its themes while making school lunches for her children — she and actor husband, Peter Sarsgaard, have two daughters, Ramona, 12, and Gloria, 6 — and then writing in concentrated bursts on airplanes while traveling. (“You have a big chunk of time with no distractions,” she enthuses. In fact, she adds, she has her whole writing session planned for her return flight to New York the day after we talk.)

Gyllenhaal has given herself a Nov. 1 deadline to complete the first draft for “The Lost Daughter.” Her October calendar is relatively free, outside of family commitments. She and Sarsgaard moved to Brooklyn’s Park Slope neighborhood 11 years ago, and because their daughters love their current school, they’ll likely be there another 11 years until the youngest girl graduates.

Director Sara Colangelo, actress/producer Maggie Gyllenhaal and actor Ajay Naidu talk about how they found the poetry used in their film, “The Kindergarten Teacher.” They were with joined by actor Anna Baryshnikov. FULL COVERAGE: Sundance Film Festi

Currently, they live a couple subway stops away, meaning that in the winter, they’re sloshing through the cold with their wet backpacks and soaked shoes to the station during the chaotic morning rush hour. Gyllenhaal dreams of finding a new place where she could walk the kids to school and come back to a cup of coffee that’s still warm on her kitchen table. But the neighborhood is expensive and low-budget indies like “The Kindergarten Teacher” won’t add much to a nest egg.

In the meantime, Gyllenhaal has been thinking about both the past and the future. Her oldest daughter just turned 12, and she keeps running into people telling (warning?) her about the coming transition.

“Maybe I’m projecting something, like I need some information,” she says, laughing. “Right now, I have a daughter who sometimes is so sophisticated and articulate and incredibly mature, and other times a big 12-year-old in my arms who is crying. And I remember that feeling. Or, at least, I’m trying to.”

Advertisement

Gyllenhaal turned 40 in November. And though she believes the number is just an arbitrary marker, she spent a lot of time mulling over the meaning of that particular birthday.

“I took it really seriously,” she says. “I feel like it was an amazing thing to turn 40. I made it a marking of really growing up. I see women who are older than me who are alive, who are really living, and accept their age and experience. I have so much admiration for the way they’ve digested it all.

“I look at them,” and here Gyllenhaal discretely nods in the direction of a woman walking on the Santa Monica Boulevard sidewalk in front of the cafe. “She knows more than me, and you can feel it. You feel that vibe? It’s so strong. That’s where I’d like to be headed.”