This extract may help:
is a stock phrase that has been used in some form since at least 1380 (according to the Oxford English Dictionary) in storytelling in the English language and has opened many oral narratives since 1600. These stories often then end with "and they all lived happily ever after," or, originally, "happily until their deaths." These are examples of the narrative form and occur most frequently in the narratives produced for children aged between 6 and 8.
- It was commonly used in the original translations of the stories of Charles Perrault as a translation for the French "il était une fois", of Hans Christian Andersen as a translation for the Danish "der var engang", (literally "there was once"), the Brothers Grimm as a translation for the German "es war einmal" (literally "it was once") and Joseph Jacobs in English translations and fairy tales.
What’s bothering is the word upon in the phrase. We still use it in connection with time, though it often sounds formal (“we plan to meet upon another occasion”). It was once the done thing to attach it to any time-related term where we would now use on or at. Lord Dunsany wrote in Time and the Gods in 1905, “Upon an evening of the forgotten years the gods were seated on the hills.”
- Another phrase with similar meaning to once upon a time was upon a day, as in Westward Ho! by Charles Kingsley: “And it befell upon a day, that we came into a great wood of ferns.” Another was upon a time — an example is in Miles Coverdale’s translation of the Old Testament book of Job, dated 1535 (I’ve modernised the spelling): “Now upon a time ... the servants of God came and stood before the Lord.”