In 1887, Queen Victoria of Great Britain was sixty-eight years old, and a widow for more than a quarter-century. Her depression over the death of her beloved Prince Albert had been alleviated somewhat by her friendship with Scottish servant John Brown—a relationship treated, not without a dose of invention, in John Madden’s 1997 film “Mrs. Brown,” in which Judi Dench played Victoria and Billy Connolly Brown. But Brown died in 1883, and the monarch’s mood grew dark once again.

After four years, however, there arrived in her life a new close confidant—Abdul Karim, a twenty-four year old clerk in an India prison who was brought to England, along with a colleague named Mohammed, to present her with a mohur—a commemorative gold coin—in recognition of her role as Empress of India, a title she had held since 1876. The queen was quickly entranced with him, and he became not just a trusted companion but, as she called him, her “Munshi,” or teacher, who instructed her in both Urdu and the wonders of Indian culture.

Karim was summarily sent back to India upon Victoria’s death in 1901 and most of the correspondence between them was destroyed, but the revelation of his diary and the publication of Shrabani Basu’s book on their relationship in 2010 has led to debate over his motives and the degree of influence he exercised over the queen. On the one hand there was Rob Coldstream’s television documentary “Queen Victoria’s Last Love” (2012), which portrayed him as ambitious and obnoxious, perhaps even a spy of sorts. (It’s available on YouTube.) Now we have Stephen Frears’ “Victoria & Abdul”—for which Basu is listed as co-writer. It presents Karim in a very different light. As played by Ali Fazal, he’s a naïve, disingenuous young man totally devoted to helping his revered empress and relieving her personal distress.

Of course, the film isn’t intended as a documentary, or even a docu-drama. It’s at once an affectionate portrait of Victoria, once again played magisterially by Dench, in her dotage—a charming counterpoint to her turn in Madden’s film. But it’s also a satire, though a fairly gentle one, of the smug elitism of the imperial British establishment—embodied in figures like the prime minister (Michael Gambon), Victoria’s private secretary (Tim Pigott-Smith, in one of his last roles), and Victoria’s playboy son Bertie (Eddie Izzard)—who are horrified by the queen’s dependence on someone whose background precludes him from ever being considered a gentleman. (It’s appropriate that at one point, Victoria sings a bit of Gilbert and Sullivan. Their operettas skewered the absurdities of British life in much the same way that “Victoria & Abdul” does.)

One expects Dench to excel in this royal role the second time around, and she does, of course, making the elderly queen a poignant yet still commanding figure. As for Fazal, he’s handsome, though rather blankly so, which is what is required in a picture that doesn’t want to delve very deeply into the relationship but present a rather wispy fable that, curiously, might make one think of “Being There.” Like Chance the Gardener, the Karim presented here is sort of a blank slate on which those around him can write whatever they desire, or need, or fear.

A good deal of the fun of the film is provided by the supporting cast. Adeel Akhtar gets plenty of laughs as Mohammed, who is as repelled by British rule of his native land as Karim appears unconcerned by it, and Pigott-Smith is properly pained and astounded by the way his control of the royal household has effectively been snatched from him. Gambon, Olivia Williams (as Victoria’s chief lady-in-waiting) and Izzard (as the blustering Bertie) share amusingly in his distress. And the always welcome Simon Callow shows up in an over-the-top cameo as Puccini.

All of those ingredients are engaging, but what melds them together into a delicious, if insubstantial, whole—a confection to be savored as much as Dench’s Victoria does her profiteroles—is the old-school technique of Frears. When she praised Sir Carol Reed’s “Oliver!” in 1968, Pauline Kael noted that it was “a civilized motion picture” because it represented “the quiet, concealed art of good craftsmanship” that, she added, “may be revolutionary now.” Her words could be even more relevant today, when jagged, hand-camerawork and hyperkinetic editing have become the new normal. In his films, like “Philomena,” “Florence Foster Jenkins” and now “Victoria & Abdul,” Frears avoids that sort of crude razzle-dazzle, preferring a genteel, comforting approach that radiates storytelling confidence. His behind-the-camera colleagues—production designer Danny Cohen, costumer Consolata Boyle, editor Melanie Ann Oliver and cinematographer Danny Cohen—work with him to fashion a crowd-pleaser that luxuriates in its gorgeous locations and moves smoothly through the admittedly fanciful narrative.

The result is remarkably satisfying, a piece of period entertainment that is old-fashioned in the best sense—elegant, refined, and beautifully executed.