A children’s book by Brian Selznick was the basis for Martin Scorsese’s wonderful “Hugo,” and another serves the same function for Todd Haynes’ equally masterful “Wonderstruck.” This deliciously artificial, intricate tale of lives intersecting in surprising ways will leave most viewers moved and delighted.

As beautifully crafted as all of Haynes’ films, this one juxtaposes stories about two children set fifty years apart. One, set in 1977, centers on Ben (Oakes Fegley), who lives in the small town of Gunflint, Minnesota. His mother Elaine (Michelle Williams), the town librarian, was recently killed in a car accident, and she never revealed the identity of his father to him. Now living with an aunt in a nearby house, he wanders home one stormy evening and finds a bookmark from Kincaid’s in New York City tucked in the pages of one of his mother’s volumes, a museum exhibition catalogue titled Cabinets of Wonder—and it has a handwritten note from an admirer named Danny on it.

No sooner does he make that discovery than Ben has an accident: while he’s on the phone, lightning strikes the house, leaving him unconscious and—when he awakens in the hospital—deaf. That doesn’t deter him from following up on the lead to his father, however, and with some help from a cousin who owes him a favor, he’s on a bus to the Big Apple.

He finds the bookstore long closed and is robbed of his bankroll on the street—this is 1977 NYC, after all, not today’s family-friendly city. But he is befriended by Jamie (Jaden Michael), who introduces him to the inner sanctum of the American Museum of Natural History, where his father works, and where he shows him a tableau of wolves from his hometown—which reminds him of a nightmare he’s been persistently having of being chased by wolves.

Ben’s story, told in vibrant color with garish period detail provided by production designer Mark Friedberg and costumer Sandy Powell and shot in bright widescreen by cinematographer Ed Lachman, is periodically interrupted by a second, set in 1927 and centering on Rose (Millicent Simmons), a deaf girl living in Hoboken with her wealthy but unfeeling father (James Urbaniak). Her story—told in luminous black-and-white—is presented as a silent movie after the fashion of “The Artist.”

Rose is obsessed with film actress Lillian Mayhew (Julianne Moore), seen in lovingly fashioned clips as a Lillian Gish type, and when she learns that Mayhew will be appearing live on a New York stage, she runs away to see her. After a brief encounter with the actress that reveals the reason for her obsession, the girl runs into the city, eventually winding up at—you guessed it—the American Museum of Natural History.

It’s here that the two stories converge in what is the central cabinet of wonders. But the connection between the two adolescents separated by time will be fully revealed only at the relocated Kincaid’s Books, presided over by a clerk named Walter (Tom Noonan), and at the Queens Museum of Art, where Ben views the remarkable Panorama of the City of New York constructed for the 1964 World’s Fair. The great blackout of the city provides a fitting climax to the conjoined narratives.

Throughout the film Haynes proves the same masterly recreator of time and place that he was in “Far from Heaven” and “Carol.” And while the central characters in this instance are children, their emotional needs prove no less affecting that those of the adults in his previous pictures. He’s helped by performances from his young stars that are unerringly right. Fegley, who starred in David Lowery’s remake of “Pete’s Dragon,” makes a likable hero, while Simmonds, who actually is deaf, is an expressive and sympathetic young heroine and Michael provides a dose of pure, vibrant energy. Moore does a fine impression of a twenties silent screen diva, and brings enormous empathy to the film’s latter stages, when the dual narratives’ linkages are made clear. The other more mature actors contribute worthy turns.

Together with Selznick, who adapted his book for the screen, Haynes has fashioned what amounts to a cinematic cabinet of wonders, filled with a dazzling array of exhibits, which editor Affonso Goncalves glides through with clarity and grace, bringing cohesion to a construct that might have easily gotten jumbled. No less important is the score by Carter Burwell, whose music finds the perfect tone for each of the component parts, especially Rose’s silent-film-within-the-film. The occasional interpolation of period songs adds to the sense of detail.

Some will call “Wonderstruck” precious in the derogatory sense, but it this case the adjective is actually appropriate in terms of the film’s value. Like Haynes’ best work, it represents cinematic artistry of a high order.