Steve Coogan and Judi Dench were drawn to “Philomena” by faith.

The British comic and Oscar-winning actress co-star in the film, which explores the benefits and costs of faith through the true story of Philomena Lee.

Lee was an unwed, pregnant teenager in 1952 when her Irish Catholic family sent her to a convent in shame. She worked seven days a week for her keep but allowed only an hour a day with her son, Anthony. After three years, the boy was sold for adoption in the United States, and Lee spent the next five decades looking for him.

Despite repeated, insistent visits to the convent, the nuns would tell her nothing. She’d signed away her rights to her son, they said, due punishment for her sinful behavior.

“We were indoctrinated and you believed everything the church told you. If they said black was white, you believed it,” Lee, now 80, said in a recent interview. “I firmly believed, once they’d discovered I was having Anthony, that I had committed a mortal sin, the most awful thing ever done.”

Anthony’s whereabouts remained a mystery until a chance meeting with BBC reporter Martin Sixsmith, who applied journalistic pressure — and sleuthing skills — to Lee’s circumstances. By so doing, Sixsmith also illuminated the plight of many other women of that generation who never knew what happened to the children they bore in those convents.

Coogan came across the story in the British newspaper The Guardian and was instantly moved.

“I started reading it out loud to my girlfriend and broke down crying half way through because it was so overwhelming,” the 48-year-old actor said. “It made me angry and I wanted to tell people about it.”

He optioned Sixsmith’s 2009 book, “The Lost Child of Philomena Lee,” without even reading it, determined to bring the story to the screen. Raised in a Catholic household by loving parents who fostered abused children, Coogan was compelled to explore where faith and religion go too far.

“My issues were a lot to do with notions of sex as being wicked and not talked about… and there’s something that’s not healthy, that’s destructive about that,” he said. “However, there’s also a philanthropy and a generosity of spirit within the church that I have witnessed. So there’s a dichotomy there.”

He co-wrote the screenplay, got Dench on board as Philomena, then decided to play Sixsmith himself. As the two investigate the fate of Philomena’s son, Sixsmith’s intellectual pragmatism is contrasted against Philomena’s simple, enduring faith, echoing Coogan’s own relationship with his family’s beliefs.

“Though the church gets criticized, I didn’t want to criticize people of simple faith,” he said. “I wanted to dignify it.”

It’s that faith that drew Dench to the role. The 78-year-old actress spent hours with Lee, learning about her story and being touched by her genuine warmth.

“I was fascinated by her and wanted to do it straightaway,” Dench said by phone from London. “Ultimately, I think it’s a story about faith. I don’t think it gets polemic about the church in any way. It tells that bit of story, but in natural fact, much more so than that, it’s about a woman who has an unshakable faith after going through that experience.”

Lee concedes that the experience of losing Anthony gave her faith a sustained shake.

“I didn’t bring up my children as Catholics,” she said. “I never stopped praying in here (she touches her heart), but I didn’t go to church. I didn’t go to confession or communion or anything like that. I still don’t go to confession or communion. But I’ll go into the Abbey where I live and sit down, have a prayer.”