The story is structured around the ballad of Tam Lin. The sacrifice of the "teind," or "tenth," which plays a major role in the novel as well as the ballad, is based on Scottish fairy lore. According to these legends, the fairies live beneath mounds or barrows under the earth. Since Hades was considered to be a place beneath the ground by many early Christians--Hippolytus, for instance, called it "a locality beneath the earth, in which the light of the world does not shine"—many Scottish ballads considered the fairies to essentially be vassals of Satan. As such, they had to periodically pay the devil for their use of the land. Paying at the correct time of year was considered essential. Since half-yearly rents in Scotland were due on All Saints' Day, or "Hallowmas,"local laws may have contributed to this tradition. In the novel, however, the Fairy Folk believe they are offering the teind to their gods.
The Perilous Gard also contains references to the Thomas the Rhymer ballad and to the Arthurian legends, as well. Kate initially dislikes British folklore because she believes that it is unrealistic. As the story unfolds, however, she finds that the folklore she once despised is based on fact, and that understanding it may allow her to save Christopher from the Fairy Queen.
Author J.B. Cheaney, in her review of the book, notes that it presents a nuanced view of the conflict between paganism and Christianity. The pagans are scrupulously honest, avoiding some of the pretentiousness of Christian Elizabethan society. At the same time, theirs is a "nature-worship paired with blood sacrifice, mindless ecstasy marred by fear, a relentless eye-for-eye accounting system that left no room for compassion." Kate ultimately decides to leave the Fairy Folk because she considers their society cruel and their religious beliefs wrong. She continues to respect them, however, and in some ways she misses their simple lifestyle.