Eleven years ago, the director Tamara Jenkins was flying round the world promoting her second film, The Savages. A sad, frank comedy about suddenly caring for a father with Alzheimer’s, it won rave reviews, then Oscar nominations for Jenkins and star Laura Linney.

Professionally, life was peachy. Privately, more rotten. Jenkins, who was then 45, and her husband, the screenwriter Jim Taylor, were trying unsuccessfully to start a family. Natural methods seemed a non-starter; medical intervention hit a brick wall; egg donation was fraught; international adoption was swaddled in red tape (no one over a certain age or weight, said China).

Her upset was exacerbated by those unfamiliar – and unsympathetic – with artificial reproduction. She was amazed by the vitriol that met an anonymous online IVF diary in the New York Times. “A lot of anger. A million crazy, extremely opinionated, muscular reactions: ‘Oh my God, this is so decadent! This is disgusting! How dare she?’

“I was just like, I’m not even gonna hang out with you heterosexuals any more. All gay people who want to have babies have to seek alternative means – they can’t just have sex. They get it.

“And so when people say: ‘Why don’t you just adopt?’ I’m like: ‘Shut the fuck up.’ There’s no ‘just’ about it. It’s very hard. It’s very expensive. It’s really intense and really difficult.”

She sighs. The woman next to her follows suit, a bit less briskly. The briefness of female fertility is, she chips in sympathetically, “a bummer. It’s just a real, real pickle.”

This is Kathryn Hahn, everybody’s favourite vaguely-under-the-radar actor, expert scene-stealer in Parks and Recreation, Bad Moms, Transparent and a dozen mainstream comedies, lately graduating to leads in the likes of I Love Dick. She is also the star of one of the two great things to have emerged from Jenkins’ years of grief (the first being Mia, born in 2010 after IVF finally came through).

Hahn and Paul Giamatti in Private Life, a very funny and moving portrait of a wobbling midlife marriage. Photograph: Jojo Whilden/Netflix

Private Life, Jenkins’ third film, is exceptional: a very funny and moving portrait of a wobbling midlife marriage. Hahn is Rachel, a novelist in her early 40s who lives in a grotty bit of New York with a struggling theatre director, Richard (Paul Giamatti). A round of IVF using Rachel’s eggs fails. The couple have been badly burned by attempts to adopt. Rachel balks at the idea of an egg donor. But then Richard’s charming, 20-year-old step-niece stays with them for a while – and the future begins to look brighter.

After decades of cinema conspicuous for crass, gaffe-strewn IVF references, Private Life’s compassion and accuracy are remarkable. Revelatory, too, for those unfamiliar with such matters in the United States, where donation is much less regulated. “It’s a little wild west,” says Jenkins. “There are ads saying: ‘Hey, I went to Harvard and Yale and my SAT scores are amazing and my eggs are $50,000.’”

In the film, Richard and Rachel scroll through sites of prospective donors trying to work out whose genes they fancy. “I spoke to some women who had been there,” says Hahn, “and they said they considered themselves feminists but they would just immediately objectify a woman’s thumbnail image and biography. ‘How beautiful is she? Where did she go to school? How tall is she? What does she look like?’”

They laugh: agog and jolly. On screen, Hahn is often the unkempt muddle in a more groomed girl gang. Face to face, she is delicate and gentle, respectfully deferential to Jenkins, 11 years her elder and more ball-busting – but also a lot of fun.

“I cannot imagine the ache of having to carry such pain,” says Hahn. “What it does to marriages, to people to feel they’ve been betrayed by their biology, to see people continue getting what you want, to feel you are being left behind.” Her eyes well up and she clutches her tum. “To feel like you are mourning little deaths in private, to have this sort of shame-cloak around you.”

Kathryn Hahn (right) as Carla Dunkler in Bad Moms. Photograph: Michele K Short/AP

Hahn herself dutifully followed her own mother’s advice not to have children in her 20s. Anyway, before she became pregnant 10 years ago, at 35, “I didn’t have the money. I didn’t have the health insurance. I didn’t have the desire at all. I was a freelancer. I was too self-involved, I was trying to figure out who I was.”

Jenkins’ ambivalence was more rigid. “I had thousands of reasons, like my own shitty family, my terrible relationship with my mother. I never had any dreams of weddings and babies. I was so butch. Then, cut to me being married and desperate to have a baby.” A sip of coffee. “You don’t really know who you are until things that you must take for granted are not available to you.”

Second-wave feminism is culpable, they agree, for lulling women into a false sense of fertility. Ditto selective media reporting. “You read in People magazine about celebrities having babies at 49,” says Jenkins. “And nobody’s saying: ‘Well, it’s probably not her eggs and it cost her $87,000 and years of heartbreak.’ It’s fucked up. It’s not the full story. And no one should have to publicly share all this. But when people say: ‘Oh my God, we were just so lucky,’ you’re like, ‘No, you weren’t lucky – you spent a lot of money.’ Which is fine, but it’s very confusing.”

The majority of IVF cycles end in tears and limbo. This reality is also suppressed. “I remember reading memoirs about fertility stuff,” says Jenkins, “and sometimes the end was that they went and had sex with their husband and got pregnant. Well, fuck you! I never wanted the film to end like that.”

Yet Private Life’s rejection of a tidy resolution has frustrated some. At Q&As in the US, says Jenkins, there has sometimes been “a kind of unsettledness with the fact they are not being told how to metabolise the story exactly. Not being told what to feel can make people uncomfortable.”

Philip Seymour Hoffman and Laura Linney in Jenkins’ 2007 film The Savages. Photograph: Fox Searchlight Pictures/Kobal/REX/Shutterstock

Such anxiety, she thinks, taps into the existential dread that underpins infertility. “If Paul and Kathryn’s characters don’t have a child, then marking time is watching the other person die. Whereas when you have a child, you’re watching something thrive. It’s such an enormous distraction from your own mortality. You’re so focused on that life you’re trying to help you’re not looking at yourself.”

And it is this – more than the gags and performances and not cocking up details – that makes Private Life so good: it uses infertility as a lens to look at so much more. It is also why its director is getting increasingly frustrated by its billing. “It’s not just a women’s infertility comedy. It’s about survival. It’s about humanity. It’s about growing. It’s about mortality. It’s about gentrification.”

Yet by dint of Jenkins’ gender, as much as the film’s subject matter, “it’s dismissed as domestic and small and a chick thing. I just feel kind of sick of it. As I get older, I’m so fatigued by the feeling that the main thing is men’s work. How often do female stories get brought to the centre of the discussion or the culture? If they do, it’s one a year.”

After all, she continues, many masterpieces have infertility at their core, but aren’t marginalised on account of it. “Who’s Afraid of Virginia Woolf? is about an infertile couple. Their twisted secret is that they have this fake baby. But nobody says: ‘Oh, yeah, the infertility play.’ It’s just one of the great American plays.” She shrugs in frustration. “I know my film is different. But if Edward Albee was Edwina Albee, I wonder if that still would have happened.”

• Private Life is on Netflix