Even though Blythe Danner has appeared on countless TV shows (“Will & Grace”), films (“Meet the Fockers”) and Broadway plays (“Follies”), it took her 50 years as an actress to headline a movie. On Tuesday night, the Sundance Film Festival premiered “I’ll See You in My Dreams,” a comedic drama in which Danner stars as a woman who contemplates her own mortality following a tragic loss. But that description doesn’t do this crowd-pleasing indie justice. When the film debuted at the Eccles Theatre in Park City, Danner received a standing ovation. On a following morning screening, the audience showered Danner with more rounds of applause.

“I’m so overwhelmed,” Danner says later backstage. “I’m a little verklempt talking about it. I’m 71, about to turn 72. I’ve never had a film role like this.” It’s also the first time the Emmy-winning actress has received Oscar buzz, even if it might be a little early to be handicapping the 2016 Academy Awards. “Oh, stop it!” says Danner, who attended the ceremony when her daughter Gwyneth Paltrow won for “Shakespeare in Love” in 1999. “I’ve been around too long. I don’t tweet. I don’t do any of that stuff, so I don’t know what anybody writes.”

Danner’s character, Carol, is a widow living in a Los Angeles. In one of the early scenes that establishes the comedic tone of the film, she goes on a disastrous speed dating excursion. Carol is in some ways like a grown-up version of Mary Richards from “The Mary Tyler Moore Show,” surrounded by her “Sex and the City”-like girlfriends (played with great comedic flair by June Squibb, Rhea Perlman and Mary Kay Place). Then she meets the neighborhood hunk (Sam Elliott) and rediscovers the possibility of falling in love again.

The film’s writer-director Brett Haley thought of Danner for the role after he saw her in another Sundance movie — 2012’s “Hello I Must Be Going.” “Frankly, I remember saying if this movie is going to work, you need someone with range, someone who is funny, someone who is dramatic and someone who is beautiful,” Haley says. “Blythe was my first choice from the beginning.” It took him two years to finance the project, which included a Kickstarter video where he interviewed senior citizens in retirement homes about their sex lives. Some of their best lines made it into his revisions.

“I’ll See You in My Dreams” was shot last spring in Los Angeles in only 19 days. Danner says she drew on some of her own life to inform Carol’s wistful remembrances. “I have a lot of life experience in loss,” says Danner, whose husband, Bruce Paltrow, died in 2002 from cancer. “I lost my husband, who I sorely miss to this day, who was the heart of the family. He was a hilariously smart and bright man. I haven’t dated since. I think of Bruce every day.” Danner says she even felt Bruce’s presence on the night of her Sundance premiere. “I thought he was here,” Danner says. “Not to get corny. If you knew Bruce, you’d know there’s no way he’s finished when he was gone. As one of my friends wrote on a bench in Central Park that was dedicated to him, ‘Now that you’re gone, you’re everywhere.’”

The most memorable scene in “I’ll See You in My Dreams,” which prompted roars of laughter at Sundance, involves Carol and her pals deciding to let loose by smoking pot. Danner says she didn’t do any research for the role. “I smoked marijuana in college, and I hated it,” Danner says. “It made me anti-social. I’m not a very social person anyway. I think what it does is bring out your essence.”

“I’ll See You in My Dreams” offered Danner a chance to revisit another part of her past. Carol belts out a soulful rendition of “Cry Me a River” in a karaoke bar, the first time Danner has sung publicly in more than a decade. Danner was worried she’d sound rusty. “I tried to do the best that I could,” she says. When she was younger, she dreamed of a music career. “I loved jazz,” Danner says. “I wanted to be a jazz singer.”

The Paltrow family (her son Jake is 39, and Gywneth is 42) are all musically inclined. They used to croon old songs — like “Stand by Me” and Christmas carols — on family road trips as children. “Both my kids have great voices,” Danner says. “We’d always make fun of Bruce, because we’d try to keep him on key, and he’d try to go off.” She remembers a 3-year-old Gwyneth singing in a perfect pitch. “When she was a baby, we used to lie in bed, and I would do a standard third harmony,” Danner says. “And she would could do the sixth and seventh. She has an unbelievable ear, which is why her accents come so easily to her.”

“I’ll See You in My Dreams,” which is being circled by several distributors, could be a breakout hit in 2015, particularly among an underserved audience of women and baby boomers eager for movies that don’t involve comic-book stories. Danner was surprised by how much the Sundance crowd was laughing during the premiere. She didn’t plan on staying for the movie, because she doesn’t like to watch herself onscreen. “And then I was instantly grabbed by it,” Danner says. “I wanted to see it.” She had previously viewed a rough cut in the director’s living room. “On the bigscreen, it’s so perfectly lit,” Danner says. “You don’t see any of our sagging, turkey necks.”