You should take the title “Doubt” seriously. Uncertainty hovers over nearly every part of this riveting, mature film, including the central question of whether a priest did or did not behave inappropriately with a young boy. Doubt is the point, you see: So much of what all people, but particularly people with religious convictions, do is based on what they’re sure is correct. But how certain can we ever really be?

Based on the Pulitzer Prize-winning play and directed by its author, John Patrick Shanley, “Doubt” is set at a Catholic grade school in the Bronx in 1964. Father Flynn (Philip Seymour Hoffman) is a relatively young priest who has a good rapport with the kids and has taken a particular interest in Donald Muller (Joseph Foster II), a recent transfer and the school’s only black student. The principal, Sister Aloysius (Meryl Streep), a rheumy-eyed disciplinarian who’s so old-school she objects to ballpoint pens and hair barrettes, is put off by Father Flynn’s modernism and eager to find fault with him.

She is particularly motivated by the sermon he gives at the beginning of the film, on the topic of religious doubt. “Doubt can be a bond as powerful and sustaining as certainty,” he says, with great conviction. “When you are lost, you are not alone.” Sister Aloysius is appalled to think that Father Flynn could be speaking from personal experience — who ever heard of a priest having doubts?!

Caught between Father Flynn’s easygoing nature and Sister Aloysius’ take-no-prisoners approach to Catholicism is Sister James (Amy Adams), a new eighth-grade teacher who still brims with so much optimism (some would say naivete) that she almost has to be played by Amy Adams. She observes a couple small details that make her wonder if something is amiss with Father Flynn’s relationship with Donald, and though she hesitates to tell Sister Aloysius, knowing she’ll make a big deal out of it, she eventually does so.

This leads to a direct confrontation with Father Flynn that is marked (as is the whole film) by powerful, carefully constructed dialogue and incisive performances. It’s the only scene with all three major characters together, and it’s a masterpiece of subtext, righteous anger, and outright hostility. What begins as a discussion about the school’s upcoming Christmas program (Sister Aloysius has much to say about the heresies of “Frosty the Snowman”) turns into a general debate over Father Flynn’s progressivism, and then the specifics of Sister Aloysius’ accusations.

The work’s theatrical origins are clear; most movies, especially ones about potentially sensational topics, don’t bother with nuanced language in the accusation scenes — they just jump right to the yelling. “Doubt” lets it simmer for a while, with electrifying results.

The stage play has only four characters — Father Flynn, Sister Aloysius, Sister James, and Donald’s mother, here played by Viola Davis — with the students only referred to, not seen onstage. Not having seen the play, I can only imagine how much more powerful it is when it’s boiled down to its essential elements like that, though the additions Shanley has made are not unreasonable.

Some of his directorial choices are a little much, however. Though Shanley has been a successful writer for both stage and screen (he won an Oscar for “Moonstruck”), this is only the second film he has directed — and the first was 18 years ago. And it was “Joe Versus the Volcano.” With “Doubt,” he is occasionally given to excessive metaphoring, as with the frequent references to wind both figurative (“The wind has changed”) and literal that become heavy-handed quickly. As another example, just at the moment when Sister Aloysius has set her sights on wringing the truth out of Father Flynn, a school employee mentions that she’s solved the mouse problem by bringing in a cat. “Yes,” Sister Aloysius says, her voice fraught with double meaning. “It takes a cat.” What is this, “Desperate Housewives”?

As unsubtle as the film’s metaphors can be, the acting is uniformly complex. Sister James’ gradual adoption of Aloysius’ cynical teaching practices grants the character some depth, marvelously conveyed by Amy Adams, and Viola Davis is unforgettable in her brief appearance as Donald’s mother. It’s a challenge for an actor to make something of a role with so little screen time, and Davis knocks it out of the park. Philip Seymour Hoffman is likewise excellent, letting his natural oiliness seep through just enough to make us think the accusations against Father Flynn could have some merit, while using his everyday good humor to make us think nah, there’s no way. Few actors could pull off that duality so believably.

Finally, I note that Sister Aloysius could easily have been a stereotypical scary nun, and her dialogue, as written, could be played that way. (I cringe to think of community theaters and high schools butchering this play with black-and-white acting.) But in Meryl Streep’s hands, the nun is three-dimensional. She’s not a monster, nor is she unreasonable, nor is she engaged in a witch hunt. In small moments here and there you can see Sister Aloysius pondering the information she has received, listening to the other characters, and speaking what she believes to be the truth. She is a real person driven by devotion and certainty — and it’s that certainty, whether she’s actually right or not, that makes her so powerful.

B+ (1 hr., 43 min.; PG-13, a couple mild profanities, some mature themes addressed obliquely.)