If Alvin Schwartz ’s popular “Scary Stories” children’s books condensed folklore into an accessible anthology form, “Scary Stories to Tell in the Dark,” an agreeable bit of fan service, performs a similar gateway function for movies. Whether it’s the scene-setting blast of Donovan (“Zodiac”), the low-height Steadicam work (“The Shining”), the red-suffused hallways (David Lynch) or “Night of the Living Dead” playing at a drive-in, the movie takes from the best.

[Read how “Scary Stories” gave a future horror author nightmares.]

The nostalgia is presumably the signature of Guillermo del Toro, who produced it. Like “The Shape of Water,” which he directed (André Ovredal did that job here), “Scary Stories” spikes its tributes with social commentary. The movie is set in 1968, more than a decade before the first book was published. The ghosts of Vietnam haunt the periphery, and Nixon’s election coincides with a gangly goblin’s arrival.

Schwartz’s tales have been woven into a cohesive narrative (and there are nods to others that haven’t been filmed) with a simple device. The main characters — an aspiring writer, Stella (Zoe Colletti); her sidekicks (Gabriel Rush and Austin Zajur); and a newcomer to their small town (Michael Garza) — snatch a book from a haunted house. The tome once belonged to a pariah kept prisoner by her family.