The entrancing animated feature Coraline, faithfully adapted by Henry Selick from Neil Gaiman’s marvelous children’s novel, is an Alice in Wonderland story. The feisty, sharp-witted Coraline (voiced by today’s busiest child actor, Dakota Fanning) finds an alternate world behind a locked door in her apartment building.

Perhaps it would be more accurate to link Coraline to Lewis Carroll’s other masterpiece, Through the Looking-Glass, since what Coraline discovers is a mirror version of her own home, with a set of parents who, unlike hers, are dedicated to entertaining her and apparently have bottomless means to do so. Her own parents, who collaborate in writing gardening books, are preoccupied with publication deadlines, so she’s left to her own devices. And her parents’ finances are severely constricted. (Teri Hatcher and John Hodgman provide the voices for both couples.)

Gaiman’s work alludes to other children’s classics as well. Like Pinocchio, Coraline is tempted by superficial delights that turn out to be traps: the Other Mother is a sorceress who has devised a make-believe domestic paradise (even the Other Father is under her spell) to try to entice Coraline to stay with her forever. And like Dorothy in The Wizard of Oz, the young heroine comes to appreciate the home from which she once felt alienated.

Selick, who also directed The Nightmare Before Christmas, manages the neat trick of making Coraline simultaneously charming and unsettling. The movie is the work of a gifted obsessive—Selick also designed the production—who possesses a phantasmagorical visual imagination. Key sequences seem to spiral into increasing oddness and lushness, reminiscent of the crazy Art Nouveau imagery that Max Fleischer supplied for the early Betty Boop cartoons in the 1930s. Selick uses a muted palette, so the bizarre developments—such as when the heads of circus performers break apart to reveal pretty young acrobats or when snapdragons bite at Coraline’s legs as she tries to escape from the garden—are even more surprising; the frame holds more visual layers than you thought possible.

The dark secret at the heart of the Other Mother’s world is that it’s all a ruse, empty at its core. The creepiest scene is the starkest one, in which Coraline takes a walk beyond the edges of that world and finds a blank.

Coraline’s companion when she leaves the confines of her familiar surroundings is a cat (voiced by Keith David), the sole creature that can exist with impunity in both worlds. In the alternate world the cat can speak, and its tone, a mixture of insolence, pride and matter-of-factness, is reminiscent of Carroll’s bewildering Cheshire Cat. But unlike Alice, Coraline learns quickly how to communicate with the cat on its own terms, and though it never exactly becomes affectionate, it does befriend her, and its guidance is invaluable.

Selick’s one mistake, a minor one, was to add a second comrade for Coraline, a boy named Wybie Lovat (Robert Bailey Jr.) whose ancient grandmother owns the apartment building. One of the most appealing qualities of Gaiman’s book is that he makes Coraline crafty and self-sufficient; when the Other Mother kidnaps her real parents, Coraline, in the tradition of storybook child heroes, figures out how to defeat her and release them. It’s that resourcefulness that earns her the right to return, a wiser and more mature person, to the world of her parents. When Wybie rides in on his bike at the 11th hour to rescue Coraline, his not terribly imaginative intervention somewhat dims her accomplishment.

Many theaters are presenting the film in 3-D, and that’s the way to see it. The 3-D effects are extremely elegant (and one of the most pleasing accompanies the final credits, so stick around to the end). They’re the work of artists, not scaremongers. In a couple of scenes, the camera looks in on Coraline beyond a wide picture window, and the impression that the window is floating in space enhances the sense that Coraline has wandered into a territory that exists beyond logic.