When people hear about Harriet Tubman, two words come to mind: Underground Railroad. 

We’ve all learned about her in history class, the story of her bravery in helping hundreds of slaves escape to freedom via a secret network of safe houses from the slave-owning Southern states to the free Northern states during the Civil War. 

For all her fame, there’s never been a movie about her life, until now. This weekend marks the opening of “Harriet,” a rousing biopic that features a fiery performance by Cynthia Erivo, who won a Tony for her part in the Broadway musical version of “The Color Purple” — along with a surprisingly direct portrayal of her immense Christian faith. 

The film opens with Harriet, originally known as Minty, at a Sunday service, where a black preacher (Vondie Curtis-Hall) leads her and a group of slaves in singing hymns. He gives a sermon intended to make them believe they should be subservient to their masters. But Harriet sees through the ruse, and boldly tries to ask her master to set her and her family free, since she has married a free black man. She also has legal proof that the master’s father wanted her and her family to be freed years before. 

When the master tears her legal document to pieces, Harriet realizes she is now in danger, and has to make a break for freedom as soon as possible. Leaving her family and her husband behind (she fears that if he runs with her and they’re caught, his free status could be taken away), Harriet winds up surrounded on a high bridge over a raging river — and makes a dramatic leap into the water. 

She survives, and manages to reach safety more than 100 miles away in Philadelphia, where she takes on a new name, Harriet Tubman, and starts a new life. But the guilt she feels about leaving her loved ones behind leads her to go back to save them. That daring rescue, and subsequent determination to save as many other slaves as possible, while dodging the obsessive pursuit of her now-former master’s son Gideon (William Alwyn), forms the heart of the film. 

Hollywood has only attempted to tell Tubman’s story once before, in the 1978 TV miniseries “A Woman Called Moses,” starring Cicely Tyson. But the recent trend to telling more stories centered around people of color — and the Treasury Department’s debate over replacing President Andrew Jackson on the $20 bill with an image of Tubman — has finally opened the doors to the new film.

Director and co-writer Kasi Lemmons places Tubman’s faith front and center throughout the film, showing her speaking directly and loudly to God several times in the movie, while also giving him the credit for guiding her to safety on her repeated 100-mile treks. It is a pretty remarkable aspect to the movie, considering it is being released by Focus Features, the arthouse division of Universal Pictures, and the fact that “art” films often are even less likely to be faith-friendly than their mainstream counterparts.

The fact that her determined spiritual side combines with a gutsy physicality, a sure way with guns both big and small, and a passionate quest for earthly justice makes Tubman a heroine who transcends the often-musty genre of historical films. Erivo, who made her cinematic breakthrough with a fantastic turn in last year’s faith-based thriller “Bad Times at the El Royale,” delivers a performance that is powerful on all fronts and at times seems like a predecessor to Linda Hamilton’s character Sarah Connor in the “Terminator” films.

There are some weak spots to the film — it drags a bit in the middle while Harriet settles into her newfound free life before feeling called to help on the Underground Railroad. The film also reaches a rather abrupt end while at the cusp of an important battle that has the audience riveted with anticipation.

Alwyn’s performance as the slave owner’s son Gideon is also a bit too smug and mannered to be as frightening as he should be — and his long hair and goatee will likely remind viewers of Leonardo DiCaprio’s far better performance as another evil slave master in the 2012 movie “Django Unchained.”

Stronger supporting work comes from Curtis-Hall as the preacher, who reveals himself to be a much stronger ally against the slave masters than he first appears, and by Leslie Odom, Jr. as the Underground Railroad’s head, William Still. Another interesting touch comes in the way that Lemmons shows Harriet communicating with her fellow slaves by singing hymns whose lines serve as coded secret messages to her fellow slaves. It’s a tactic that is both an effective tension builder and a perfect showcase for Erivo’s outstanding voice.

Overall, Lemmons’ and Erivo’s ability to effectively pull viewers’ emotions in two directions at once is an impressive feat. By providing Tubman’s life with a handsomely mounted showcase, it’s also an entertaining film that fulfills a far greater purpose.