The Twelve Dancing Princesses is a Grimms' tale that is known under several names such as "The Dancing Shoes," "The Worn Shoes," and "The Shoes that Were Danced to Pieces." The Grimms heard their version from the Haxthausens, a family of friends, who themselves had heard the tale in Munster. Other versions of the tale were found in Hesse and Paderborn, Westphalia with interesting variations.
The version of the tale from Hesse has only one princess who wears out twelve pairs of shoes every night. Twelve apprentices are required to replace the pairs each day. One night, the youngest apprentice hides and frees the princess from the curse, ultimately winning her hand in marriage.
In the Paderborn version, three princesses wear out their shoes. A decree announces that whoever breaks the spell will win the hand of the youngest princess in marriage. Anyone who tries to rescue the princesses and fails, however, will be put to death. Twelve men die in their attempts before a young soldier finally breaks the spell.
In the Victorian age, editors and writers didn't care for the succeed or die terms of the decree and softened that aspect of the story as much as possible. The version by Andrew Lang which I have annotated on this site does just this by never really explaining what happened to the men who previously failed.
The version best known today is not very old according to Stith Thompson, most likely only dating back to the 17th century A.D. He also thinks that the story is not widely distributed although over a hundred variations of the tale have been found in Central Europe, most frequently from the area between Serbia and Finland. The tale is hardly known in France and cannot be found further east than Russia.
The nearest British version is "Katie Crackernuts" (not the Ugly and Beautiful Sisters tale of the same name) which Lang published in Longman's Magazine in 1889 and apparently collected in the Orkneys. This tale makes Katie the heroine who saves a prince from the curse which makes him go underground to a great ball every night. She collects nuts and uses them to mark their escape route on the third night of her adventure. They are later married and the story ends "happily ever after."
One of the earliest translations of the tale into English can be found in Iona and Peter Opie's Classic Fairy Tales. The version they present originally appeared in German Popular Stories, Translated from the Kinder und Haus-Marchen, collected by M. M. Grimm from Oral Tradition, 1823. Much of this history is also derived from the Opies' introduction to the tale.