If you go to enough movies, it’s inevitable that sometimes you’re going to get lucky. You’re going to stumble into one that’s this funny and sweet and sad and serious. This one even crosses over into thriller territory.

“The Book of Henry” is a movie that will take your emotions out for a ride. The title suggests that it’s about a book, and it is — a small, bright red one. But it’s more about the 11-year-old boy it belongs to, who is constantly writing and drawing in its blank pages.

It wouldn’t be proper to call Henry (Jaeden Lieberher, from “St. Vincent” and “Midnight Special”) merely a bright kid. When the students in his elementary school classroom get up, one at a time, to talk about “My Legacy,” he launches into a brief speech about staving off existential crisis. After class, he’s outside on a pay phone, trading stocks. At home with his mom and his younger brother — dad left long ago — he tinkers with Rube Goldberg-like contraptions, keeps his eyes on the family’s financial dealings, and is always scribbling in that red book.

It’s a tight family. His mom Susan (Naomi Watts) is loving and supportive. She has a regular waitress shift, but always makes time to be with the kids, even though she (comically) donates a lot of it to self-improvement on violent video games. His brother Peter (Jacob Tremblay, from “Room”) is bright in his own way, but is seen mostly looking in adulation at Henry.

There’s a lot of warmth established here. But there are also — and this is what helps make it such a strong movie — different degrees of threats against that warmth. Susan isn’t sure she knows the right way to be a mother. Chatting with her waitress pal Sheila (Sarah Silverman, playing it sassy but low key), she says, kind of to herself, “Please don’t let me screw them up.” Henry believes there’s something strange and probably unpleasant going on at the next door neighbors’ house, where Glen (Dean Norris) lives with his stepdaughter Christina (Maddie Ziegler). He has no proof that anything is wrong, but young Christina is always sullen and has very little to say. There’s a chance that Henry’s concern is an extension of his outlook on life — he worries about people mistreating other people, and believes that apathy is the worst thing in the world.

But he isn’t one to sit around being gloomy. He’s got projects: He’s researching crime scene investigations; he’s learning about illegal ways to buy firearms; he’s watching out for his brother, and keeping a caring eye on Christina; he’s, of course, writing in the book; and, though he tells no one else, he’s trying to keep control over the fierce headaches that have become a regular part of his life.

Now, don’t let this scare you off. Yes, “The Book of Henry” can be categorized as one of those “disease-of-the-week” movies, but there’s not a cliche to be found. Henry ends up in the hospital, under the care of a gentle and compassionate surgeon (Lee Pace). Susan and Peter take turns at freaking out, but Henry maintains his calm. He has to, because there are so many things he still needs to take care of.

But there’s a point in the film where he can’t do it anymore, even though there’s his own family and the girl next door that he believes needs his help. It’s then that the reasoning behind the film’s title is made clear. The second half of the film is about the red book, and the fact that it’s kind of a guide, one for Susan to follow. It’s what leads to that thriller business, but it’s also what gives the story a sense of playfulness even in the midst of very serious issues.

The film’s direction is equally strong in the telling of the story and in working with the actors. Naomi Watts and Jaeden Lieberher own every scene they’re in, whether they’re alone or together. It’s a thoughtful, positive, complex film that earns its bittersweet but happy ending.

— Ed Symkus writes about movies for More Content Now.

“The Book of Henry”
Written by Gregg Hurwitz; directed by Colin Trevorrow
With Naomi Watts, Jaeden Lieberher, Jacob Tremblay, Dean Norris
Rated PG-13