Those strange, benevolent fairies who show up to give advice or magical artifacts. When did they start to appear in fairy tales? How many people have them? What are their powers? Where did they come from?
Let's start with the most well-known - Sleeping Beauty's and Cinderella's.
Fairies attend Sleeping Beauty's christening and give her gifts such as beauty and a sweet singing voice. An angry fairy, however, dispenses a curse.
The most famous is Cinderella's fairy godmother, who appears with magical clothing and a coach just when Cinderella needs them.
Both of these stories with their attendant fairies were first published by Charles Perrault in 1697. The older Sleeping Beauty story, Sun, Moon and Talia, had no fairies or magic. As for Cinderella, the Grimms' Aschenputtel had the heroine aided by the ghost of her dead mother. The Chinese Ye Xian has the ghost of a pet fish which was originally a guardian spirit sent by her deceased mother, and the Scottish Rashin-Coatie has a red calf.
There are plenty of tales where the hero is aided by a fairy or other magical creature, but Charles Perrault and probably also Madame D'Aulnoy popularized the fairy godmother. In 1697, they both put out books of fairytales in which such beings were heavily featured. D’Aulnoy wrote "Finette Cendron," "Princess Rosette," and "Princess Mayblossom," as well as “The Blue Bird” and “The White Doe,” where the villain has a fairy godmother.
The trope of the fairy godmother became more and more common during the era of literary French tales such as "Prince Fatal and Prince Fortune" or "Princess Camion" (1743), where they typically show up at births and give prophecies.
The relationship reflects a Catholic environment. In medieval times, the godparents served an important role in the child's life, including their religious education.
Although fairy godmothers didn't become a widespread thing until Perrault and D'Aulnoy, their roots do go back into legends and myth. In medieval romances, the "fays" frequently preside over births and give out gifts and prophecies.
Six fays arrive to bestow heroic qualities on the newborn Ogier the Dane. The final one, Morgain picks him as her future husband.
A similar scene, also with Morgain, appears in the Enfances Garin de Montglane.
In the 13th century Huon de Bordeaux, Oberon was cursed by a fairy at his christening.
In the stories of Merlin, a man named Dionas is the godson of the goddess Diane. Diane gives his daughter Niniane a destiny as a great sorceress.
In 1621, Tom Thumb has "the Queene of Fayres" as "his kind Midwife, & good Godmother." She helps at his birth, and throughout his life provides him with magical aid and tools - including fancy clothing and impractical footwear.
Marian Roalfe Cox collected 345 variants of Cinderella. In her collection, fairy godmothers appear in Peau d'ane (Perrault 1697), Finette Aschenbrodel (1845), the Russian Zamarashka (1860), Hubac's Peau d'Ane (1874), Baissac's Story of Peau d'Ane (1888), Catarina (1892), and The White Goat.
In the Basque tale of Ass'-Skin (1877), there is a human godmother who gives the heroine advice. In both "Marie Robe de Bois" and "Le Pays des Brides" (1892), the heroine has a "sorceress-godmother."
In "The Young Countess and the Water-Nymph" (1852), a water-nymph agrees to stand godmother to the child of her friend the countess.
In "Ditu Migniulellu" (1881), the word godmother is not used, but fairies do show up at the girl's birth to dispense gifts, and one returns to help her get to the ball.
In "Terra Camina" (1892), there is a christening and a godmother with magical powers. However, it's hard to tell whether she's a fairy or not.
The Estonian tale of Rebuliina (1895) describes the christening in detail. The godmother is mysterious and is never identified, but clearly has magical powers.
There are countless stories where fairies aid the heroine, but the ones I've mentioned are specifically godmothers or have a connection to the heroine beginning at her birth.
These magical godmothers are not like typical fairies, which are not creatures you would want around your newborn baby. Indeed, many types of fairies and spirits flee church bells and would never be seen at a christening. They're more likely to steal an infant than bless it, and babies aren't safe until they've been baptized.
In contrast, fairy godmothers are wise women, typically benevolent, focused only on furthering their godchild's lot in life. (They still have a capacity for evil, as seen with Oberon or Sleeping Beauty.)
When the Cinderella figure is aided by the ghost of her mother, it has a hint of ancestor-worship. In a different direction, I think there's a version where Buddha steps in.
Fairy godmothers, who preside over births and prophesy the newborn's fate, are descended from the Fates of mythology - like the Roman Parcae, Greek Mourae, and Norse Norns.
The Mourae appear shortly after Meleager's birth to prophesy his death.
The Prose Edda says that besides the three main norns Urd, Skuld and Verdandi, "there are yet more norns, namely those who come to every man when he is born, to shape his life".
There are other mythologies featuring similar figures. Pi-Hsia Yüan-Chün was a Chinese goddess of childbirth; she had two attendants, one of whom brought children and the other who gave them good eyesight. Latvian folklore tells of a birth goddess named Lauma, and fairies known as Laumė that foretell a newborn's future. The Albanian Fatit or Miren, butterfly-riding fairies, approach the cradle three days after the baby's birth to determine its fate.
The story of the fairy godmother puts these myths into a Christian context. It formalizes the relationship between the child and the spirit overseeing her birth, and brings them closer together, explaining why the fairy's so invested.
Going from the other direction, it plays up godparents. The godmother steps in for the deceased mother and provides guidance, but this approach turns her from a mere advice-giver into an incredibly powerful guardian.
I haven't found anything on fairy godfathers. Well, except Godfather Death, a very different kind of story, where a very different mythical being takes the role of godparent.
This website is based on my research into folklore.