Life has a way of throwing big decisions at people unexpectedly, and in the romantic comedy “The Big Sick,” actor-comedian Kumail Nanjiani (best known for his co-starring role on HBO’s “Silicon Valley”) shares one that changed his life forever. Co-written by Nanjiani and his wife Emily V. Gordon — a popular writer and comic in her own right — the movie recounts the couple’s initial meeting and early relationship, one tested by a culture gap and a near-fatal illness.

Inspired by real-life events early in their relationship, “The Big Sick” hearkens back to Nanjiani’s pre-stardom days as a stand-up comic in Chicago. That real-life experience pays off throughout the film, with a realistic portrayal of the typical backstage banter among comics struggling for stage time.

Playing himself, Kumail scores a key performing slot in front of an important talent scout, but his concentration is thrown off by a loud cheer from a graduate student named Emily (Zoe Kazan). He flirts with her from the stage, leading to a rendezvous that evolves into a relationship.

However, Kumail hides this fact from his Pakistani Muslim immigrant family members, who wonder why he doesn’t practice his faith as traditionally as his siblings. His mother also constantly has women “just drop by” at family dinners in the hopes of leading him into an arranged marriage.

But the agnostic Kumail never takes the bait and he also pretends to pray when his family orders him to do so in their basement. Tensions arise when Kumail finally admits to his brother that he’s dating a “white woman,” and Emily figures out that he’s hiding her from his family. 

Yet when Emily lands in a hospital ICU with a massive, life-threatening lung infection, Kumail rushes to be at her side. Within moments, a doctor informs him that she needs to be put into a medically induced coma to survive.

As her out-of-state parents (Ray Romano and Holly Hunter) arrive to care for her, Kumail finds himself in yet another conflict since her mom knows he broke Emily’s heart. But he finds empathy from her dad, who has a secret of his own, and learns not only how hard relationships can be, but also the value of family and reconciliation.   

“The Big Sick” is filled with moving moments that add impressive depth to what could have been another standard entry in Hollywood’s endless stream of romantic comedies. Nanjiani and Gordon clearly put a lot of heart into their script, with director Michael Showalter (“Hello, My Name Is Doris”) striking a perfect balance between humor and sadness, adding to his string of character-driven comedies.

The movie is at its best in its positive depiction of family, its exploration of the struggles a long-term marriage can face and of the importance of forgiveness and reconciliation in any relationship. It might seem easy for an actor to play himself, but Nanjiani does outstanding work and displays a brave willingness to share his most emotional moments, warts and all.

Kazan brings a refreshing charm to her role, and it’s a shame that she has to be knocked out in a coma for much of the story line. Hunter delivers her most dynamic and feisty performance in at least a decade, while Romano builds on his decade-plus of impressive dramatic performances since the end of his popular sitcom “Everybody Loves Raymond.”

One of the film’s executive producers is Judd Apatow (“The 40-Year-Old Virgin”), who has become a cinematic king of comedy over the past decade, with a string of acclaimed hit movies that mix raunchy comedy with serious moments, yet usually wind up promoting positive values. That combination is a major part of the R rating for “The Big Sick,” which features foul language, but also serves up a message that promotes marriage, family, forgiveness and reconciliation.