Many's the time that "Masterpiece Theatre" has fallen short of masterpiecity, and Sunday night's offering, "Goodnight Mister Tom," is more like the British equivalent of a "Hallmark Hall of Fame" than an auspicious artistic triumph. But think about it: The British equivalent of a "Hallmark" isn't a bad thing to be.

Based on a novel by Michelle Magorian, "Goodnight Mister Tom"--at 9 tomorrow night on Channel 26 and other PBS stations--could only have come from the land of Charles Dickens. It's about a 9-year-old boy plucked from his ramshackle flat in London and sent to a small village so that he will be safe from German bombing raids during World War II.

Many children were sent on similar journeys of safekeeping, according to sour and dour series host Russell Baker.

Little Willie Beech, played by Nick Robinson, is assigned to the eerily named town of Little Weirwold and the home of village crank Tom Oakley, played by "Inspector Morse's" John Thaw. Old Tom wants a boarder about as much as he wants ticks in his beard, but he's told it's his patriotic duty. The name Thaw is apt, because we know that's what chilly Oakley will do after having the child's company for a few days.

It seems Mister Tom, as the child calls him, lost his own 5-year-old son, and his wife, to a dread disease that struck while he was away fighting the previous world war. For years he has stalked and grumped his way around town with his border collie as his only companion and with his emotions sealed off from the world. Willie will break through those defenses and help Oakley rejoin society.

Writer Brian Finch and director Jack Gold seem so unashamed about the old-fashioned nature of the story and its moss-covered cliches that the film has a kind of oblivious purity to it. One could recommend it unreservedly for family viewing except that in the second half, the viewer is confronted with a horrific image potentially traumatizing to very young children. In fact, it's potentially traumatizing to everybody.

The image has to do with the fact that Willie is an abused child with a back badly scarred by his hysterical, paranoid, religious-fanatic mother. She's Dickensian, too, in the darkest possible way.

We think we know where the story is going--that Willie and Tom will bring out the best in one another and have a merry old time until the unhappy day they have to part--but then suddenly they part long before the end of the film. What happens henceforth is unexpected but not unexpectedly moving. It helps that the old actor and the young one mesh so touchingly, and that stories about grandpa-figures and little kids are almost always irresistible.

The film has a passing resemblance to the stage and film classic "On Borrowed Time," a six-hankie humdinger. It may also remind some viewers of "Hope and Glory," John Boorman's film about a child's-eye view of World War II. That movie was irreverent and rompish, however, whereas "Mister Tom" is no-nonsense and heart-tugging.

As has happened about a jillion times with British imports on PBS, the country-village setting accounts for a large part of the film's allure. It's a place and time that, despite the war, look terribly inviting. Oh to be in England now that--blah blah blah.

When Tom's defenses break down with the boy, he also agrees to serve as temporary conductor of the church choir. The hymn they sing, "Jerusalem," has played a key role in British films ranging from "The Loneliness of the Long-Distance Runner" to, of course, "Chariots of Fire." As the choir continues singing, director Gold injects a short montage of village life; it includes the sight of a hefty local woman standing in her back yard, arms extended heavenward and joining in on the line "Bring me my chariot of fire."

This tiny moment is a thing of extreme beauty.

Toward its end, the film gets choppy. A major crisis is confronted and, rather too easily, averted, only to be followed by another crisis that seems tacked on to fill up the time. But time with Tom and his virtually adopted son is well-spent anyway.

"Goodnight Mister Tom," no relation to "Goodbye, Mr. Chips," is a simple film, neither portentous nor momentous. It's one of the lilies of the field. If you come across it, by either accident or design, you are bound to be charmed and warmed. There've been plenty of genuine masterpieces that haven't had effects as salutary as those.

CAPTION: Willie (Nick Robinson) and Tom (John Thaw) in a bomb-damaged building.