You don’t know the name John Gatins, but maybe you’ve seen the sports-related movies he wrote: “Summer Catch” and “Hard Ball” (both awful) and “Coach Carter” (by-the-numbers, but tolerable). He has now written a fourth film, and has taken the director’s chair for the first time. The result is “Dreamer,” a movie so full of sunshine and joy that it’s impossible not to be pleased by it.

Having moved away from ball-oriented sports, Gatins this time focuses on horse-racing, in what is purported to be “inspired by” a true story. In Lexington, Ky., is a once-great horse farm, now devoid of all things equine, owned by the Crane family. Ben (Kurt Russell) trains horses for the nearby racetrack, his wife Lily (Elisabeth Shue) works at a diner, and little girl Cale (Dakota Fanning) works full-time at being adorable. Ben’s dad, an old coot called Pop (Kris Kristofferson), lives on the property, too, though some long-ago falling out between him and Ben has rendered them non-communicative.

Against Ben’s advice, a suit-wearing, cold-hearted horse owner named Palmer (David Morse) insists that his horse Sonya run despite having recently suffered a slight injury to one of her legs. Sure enough, Sonya falls and breaks the leg during the race, and Palmer says, essentially, “Put her down and let’s get back to work.”

Ben, furious that Palmer let poor Sonya run in the first place, takes the horse home and nurses her back to health. The plan is that once she’s healed, though she’ll never race again, she can still produce a profitable offspring — she is a thoroughbred, after all.

At this point I wrote in my notes: “She’ll race again, against a horse owned by Palmer, and win.” I then added: “Her jockey will be Freddy,” referring to a character played by Freddy Rodriguez who used to be a jockey but has been afraid of it since a near-fatal injury some years ago.

The fact that those (and other) predictions came true is irrelevant. The film is not about surprises but about heart, which it has in abundance, mostly through the winningly earnest performance by Fanning, Kristofferson and Russell.

Fanning seems to have emerged from the creepy phase where she was an adult in a little girl’s body, and has now, at the age of 11, become simply a smart pre-teen girl. You forgive maudlin daddy-daughter dialogue when it’s between her and Kurt Russell: Fanning is good enough to convince me she means every word of it, and Russell, with that kindly, youthful face of his — why, in a tenderhearted role like this, you’ll believe anything he tells you.

I note with some surprise that Kurt Russell and Kris Kristofferson really do look like father and son, too, especially around the eyes — a case of thoughtful casting giving the film an extra layer of comfort and likability.

Is this a brilliant film? No. It’s ordinary in a lot of ways, and it reminds me of why stories like this usually have one parent dead: because the story doesn’t have have room for both of them. (Poor Elisabeth Shue, thanklessly playing the Mom With No Screen Time.) But it excels in the important areas of warmth and honesty. Most people enjoy a sweet, wholesome movie with an inspiring story; “Dreamer” is a reminder that those people need not be suckers.

B+ (1 hr., 42 min.; PG, a 'damn' or something.)