Two organizational patterns that Gordimer uses in writing "Once Upon a Time" are the frame narrative and the fairy tale.
A frame narrative includes an introductory portion that sets up a story-within-the-story. Often a frame narrative will return to the frame at the end of the internal story, but in this case, Gordimer lets the conclusion of the internal story act as the final ending. In the frame, the narrator wakes up in the middle of the night fearing an intruder has come into her home. When she realizes the sounds are just her house creaking, she tells herself a bedtime story to calm herself. That bedtime story is the story-within-the-story.
Gordimer also uses elements of fairy tales to structure the story-within-the-story. Prominent characteristics of fairy tales that she uses are "happily ever after," magical elements (a witch and a dragon), good vs. evil (the couple believes they and their neighborhood are good, while the "people of another color" who live elsewhere are evil), the number three (there are three members of the family, three minor characters, and the phrase "heed ... advice" occurs three times), a strong conflict (the couple tries to protect themselves from invasion), and a strong moral lesson (the destructive nature of fear and prejudice).
"Once Upon a Time" uses the frame narrative and elements of traditional fairy tales to provide its story structure.