Actually, it is neither. It is science fiction, set in the future, with a bit of fantasy in its conclusion. The story's physical setting is the Northeast and New York City; the time period is sometime in the future after a terrible war has destroyed civilization. Although the story was written prior to the Atomic Age, there are many implications that some kind of nuclear holocaust has occurred. John and his people are the descendents of the survivors; they live primitive lives, by modern standards, and for generations have been forbidden to enter "the place of the gods" (New York City). Again, the implication is that this place was originally forbidden because it was radioactive.
John leaves his home and travels to the forbidden place; once he arrives, many clues can be found in the story that identify what was once the great city that we know today. In the story's conclusion, John experiences a fantastic vision in which he "sees" the destruction of New York, and readers find out who the gods really were and what happened to them.