In some respects, NBC's four-hour movie "Little Gloria . . . Happy at Last" out-masterpieces "Masterpiece Theatre." The film, to be shown in two parts tomorrow and Monday night (at 9 o'clock both nights on Channel 4) is both opulent and intelligent, and unlike many of the British creakers seen on PBS, this one is about American royalty for a change.

"If there was such a thing as an American royal family, it would be the Vanderbilts, of course," says John Hillerman as society columnist Cholly Knickerbocker early in the film. But royal families from Agamemnon's to Joe Kennedy's have had their scandals and shame. "Little Gloria," from the best seller by Barbara Goldsmith, re-creates a lulu of a rich-folks scandal from the '30s: the furious court battle for custody of Gloria Vanderbilt, the 10-year-old millionairess.

A scandal of this sort may seem almost quaint compared to the scandals of the wealthy that polka-dot newspapers today. But "Little Gloria" trades in more than nostalgia or eyebrow-raising; it gets to some of the perversity that is endemic to privilege. Both the writer, William Hanley, and the director, Waris Hussein, eschew traditional soap-opera melodramatics, and yet one can't help being reminded, as the story unfolds, what a dream of a tabloid tale it was, and is. Succulent, appalling, and totally irresistible.

What was delicious gossip in the '30s becomes delicious drama now. "Little Gloria . . . Happy at Last" is fascinating and wonderful.

To tell the story, the producers hired a glittery crystalline cast, including Bette Davis as dowager Alice Gwynne Vanderbilt; Angela Lansbury as eccentric, vaguely anti-Semitic Gertrude Vanderbilt Whitney; Maureen Stapleton as the child's fanatical and possessive nurse Emma Kieslich; and Christopher Plummer, attractively dissipated, as playboy Reginald Vanderbilt, who entertains his baby daughter by tinkling the ice in his cocktail, and dies a drunk before the first hour of the film is over.

His death leaves his widow, Gloria Morgan Vanderbilt, played as an achingly empty shell by the delicately beautiful Lucy Gutteridge, relatively penniless, but Little Gloria, their daughter, the beneficiary of half a $5 million trust fund. And that money precipitates the skullduggery to follow, all of it played out passionately against truly magnificent locations. In this movie, the rich really do look rich. And when their behavior is swinish, it is believably swinish--not the corny cloak-and-daggering of something like "Dallas."

The versatile, dependable Hillerman, terribly overqualified for his second-banana role on "Magnum, P.I.," pops in now and then to nudge the story along as pungently as possible, dictating Knickerbocker's column into a cumbersome old recording machine. The only weak link in the casting is Glynis Johns as Little Gloria's maternal grandmama, a petty and interfering shrew. The accent used by Johns is unconvincing, and her performance too much of a caricature.

By the time Little Gloria was eight years old, she had her own bodyguard -- so traumatized were wealthy families by the Lindbergh kidnaping -- while her mother party-hopped about Europe. An underlying theme of the film, which one will perceive only if one wants to, is that maybe nobody in America should ever be this rich. But they were.

The trial begins in part two, the Vanderbilt women allied with Gloria Morgan Vanderbilt's own mother to take the child away from her. The newspapers go happily wild -- they don't get handed stories like this every day -- and there are scenes of the judge in the case (Barnard Hughes, much more believably -- and quixotically -- judicial than in the dreadful "First Monday in October"), later revealed to be a dipsomaniac, personally chasing reporters and photographers away from the courtroom doors. Little Gloria, who earlier was seen coloring the newspaper photograph accompanying the obituary of her paternal grandmother (Davis), is also seen reading accounts of the trial that would, one assumes, screw her up for years to come.

Hanley's screenplay doesn't have that enervated, padded, TV-movie feel; things keep happening, and the dialogue is frequently elegant. When Reggie is wooing Gloria Morgan Vanderbilt, he tells her, "Oh my dear child, just close your eyes and dance," a line with considerable '20s resonance. What has any marriage ever been, he asks later, but "closing one's eyes and hoping for the best"? Director Hussein, who previously made the very handsome "Edward and Mrs. Simpson," has more than an eye for detail; he knows how to make images register and count for something, as in an opening pan along a shamefully overstocked banquet table at a posh 1922 affair, with a society band tootling out "Toot Toot Tootsie" in the background.

It's during this party that Knickerbocker dubs Gloria Morgan Vanderbilt "Glorious Gloria," a phrase that sticks. This film is glorious, too -- gloriously entertaining, and fabulously sad.