Todd Haynes is a transcendent filmmaker, one who can haunt your imagination and carry you away, but in “Wonderstruck,” there’s more artistry in his storytelling than there is in the intricate mechanical story he’s telling. We’re watching a visionary humanist apply his luminous voice to a piece of emotional Tinkertoy. The film is based on an illustrated children’s novel by Brian Selznick, who wrote and drew “The Invention of Hugo Cabret,” which served as the basis for Martin Scorsese’s widely praised but — to me, at least — frenetic and overwrought gimcrack fantasy “Hugo” (2011).

“Wonderstruck” is a supple and flowing experience by comparison. Haynes, working from a script by Selznick, guides and serves the material with supreme craftsmanship. For a while, he casts a spell. Yet one of the film’s noteworthy qualities is that it creates a nearly dizzying sense of anticipation, and the payoff, regrettably, doesn’t live up to it. “Wonderstruck,” with its tale of two lost and impaired children finding each other across time, will certainly be an awards contender, and it may gently push the buttons of more than a few moviegoers, but it’s an ambitious doohickey impersonating a work of art.

For a while it plays like two movies in one, and Haynes is so on his game in staging each of them that the audience gets swept right up in the bittersweet mixed-media rapture of his filmmaking. In 1927, we meet Rose (Millicent Simmonds), a 12-year-old urchin with a sweetly quizzical, catlike face. She’s lonely and deaf, and she runs away from her family’s mansion in Hoboken, N.J., to seek some sort of redemption amid the glittering lights and stone towers of New York City.

We’ve already seen her go to the cinema to watch a silent film called “Daughter of the Storm,” featuring Lillian Mayhew (Julianne Moore), a fabled Hollywood star Rose moons over like an obsessive fan. Haynes shows us a snippet of the silent (very Lillian Gish and D.W. Griffith), which he stages with windblown authenticity — and, in fact, the whole 1927 section of “Wonderstruck” is designed to be a kind of stylized silent movie, like “The Artist.” It’s shot in pristine storybook black-and-white, with no spoken dialogue and occasional shots of written notes that act as intertitles. The effect, at once beguiling and melancholy, is to place the audience right inside the experience of Rose’s deafness. Before long, her little-girl-in-the-big-city adventure reveals why, exactly, she’s lonely, and why she feels so drawn to Lillian Mayhew.

The movie cuts back and forth between this story and one set 50 years later, in 1977, about another child fighting off the sadness of his isolation. Ben (Oakes Fegley), with shaggy hair and a private, doleful demeanor, lives in Gunflint, Minn., a rural town where not much seems to be happening. He’s a collector of things, and in flashback we see him pestering his mother, the free-spirited Elaine (Michelle Williams), to tell him about his father, who has never been around and remains a mystery.

Haynes signposts the era with a couple of references that are a bit on-the-nose for him: David Bowie singing “Space Oddity,” and a pointed allusion to the Oscar Wilde quote “We are all in the gutter, but some of us are looking at the stars” — yes, it’s a movie about cosmic dreaming! But then it’s revealed that Elaine, too, has been taken from Ben’s life (she died in a car crash), leaving him with a single random clue to unlock the secrets of his past: a tattered old bookmark from Kincaid Books in New York City, on which are written the words “Elaine, I’ll wait for you. Love, Danny.”

What finally sets Ben forth on his odyssey is the event that fuses his spirit with Rose’s: He’s struck by lightning, which robs him of his hearing. Grabbing his late mother’s rainy-day savings, he hops a Trailways Bus to New York in search of Kincaid Books, and when the bus pulls into the Port Authority, he walks into a world — Manhattan in the scuzzpit late ’70s — that the film portrays with as much wide-eyed exoticism as it does Rose’s silent-movie fairy-tale cityscape. The world she’s in was a black-and-white garden of innocence; the one he’s in is that same garden after the Fall.

It’s here that “Wonderstruck” strikes a note of true wonder, soaring, for a while, into Haynesian poetry. Anyone can strew trash around a set, but when Ben wanders into the bus station, with its graffiti-dripped escalators, Haynes creates a shockingly dilapidated landscape, fraught with sleaze and danger, that’s like a time machine bringing you back to the days when New York really did look like a dystopian “Planet of the Apes” sequel. Re-creating the seediness of Times Square and the droopiness of the Upper West Side, the director, working with the great cinematographer Ed Lachman, adopts a shooting style that’s quintessential ’70s — much deep focus, with grainy vibrant colors and heatwaves in the air, and the marvelous “Superfly”-gone-diva funk of Esther Phillips’ “All the Way Down” on the soundtrack. Yet experienced through Ben’s eyes, and his lack of ears (there’s sound, but very little dialogue), the effect isn’t squalid so much as it is beautiful. Haynes sees the rotted-out city as a marvel, an amusement park of entropy.

Ben searches in vain for Kincaid Books, and he loses his cash to a scooting pickpocket, but he also meets Jamie (Jaden Michael), an eager kid in a Michael Jackson ’fro. The two hang out at the American Museum of Natural History, taking in the splendid wildlife dioramas, and just as this is happening, Rose, 50 years ago, is drawn to the very same locale. The movie would like us to experience the museum as a cabinet of wonders writ large.

But it’s here, just when “Wonderstruck” should be taking wing, that the film starts to turn prosaic and stilted, with overly tricked-up layers of “meaningful” coincidence. (You won’t believe how those dioramas connect to Ben’s past.) The revelation of the link between Ben and Rose is actually quite lovely, but much more so than what happens next. Haynes invests an exhibit at the 1964 World’s Fair — the astonishing Panorama of the City of New York — with a nearly mythological import, adding a motif that echoes the use of Barbie dolls in his underground masterpiece “Superstar: The Karen Carpenter Story.” But the resonance, as it were, remains mostly in the filmmaker’s head. It doesn’t translate into the emotional knockout we’re yearning for.

There’s a chance that “Wonderstruck” will be greeted as Haynes’ most “mainstream” film to date — not because it’s any more accessible than “Carol” (his Cannes entry from two years ago), a rapturous romantic noir that should have been a much bigger hit. No, the “mainstream” element of “Wonderstruck” is that it’s all about kids, so it has an aura of unusual innocence for a Todd Haynes movie. But innocence isn’t the same thing as artistic virtue. “Wonderstruck” is a movie that literally tries to add up, piece by piece, into a fully assembled puzzle of greatness, but the puzzle is less than transporting because you can still see all the seams.