side by side comparison of the Grimm Brothers' take on the Rapunzel. It appears that even the good brothers had multiple versions of the tale!
The Brothers Grimm was adapted their story from "Persinette" which was written in 1698 by Charlotte-Rose de Caumont de La Force (the dauphine of Louis XIV of France). Another influence on the familiar tale was "Petrosinella" told by Giambattista Basile (yeah, him again). But the origins of "Rapunzel" are much older. A 10th-century Persian fairy tale, Rudaba, appears to be the original twist on the tale of a woman letting down her hair for access to her tower prison.
Once again we have a fairy tale that opens with a couple wishing for a child. In their home, there is a small window in back that overlooks a walled garden owned by a witch. One day as the woman is looking out at the garden she sees some rampion radish (rapunzel) and is overcome with a desire to have some. Eventually her craving becomes so great that she tells her husband she will die without eating some. So two nights in a row he risks the witch to get his wife some rampion. But on the second night the witch catches him. When he tells her why he is there, she allows him to take all he wants in order to keep his wife alive but the cost will be his unborn child (although the version I read doesn't say so, it's clear that the woman's insatiable craving is a result of pregnancy). The man agrees and when the child is born, the witch takes her and locks her in a tower where there are no stairs or doorways. To gain access the witch calls to the child, Rapunzel, to lower her hair which the witch scales to reach the top. One day a prince riding nearby hears Rapunzel singing and is enchanted. But he can't figure out how to get to her until he happens to see the witch, one night, calling out to Rapunzel. The next day he does the same thing. Of course, Rapunzel, who until then had never seen a man, falls in love with him and allows the prince to visit her daily and they devise a plan to help Rapunzel escape. But just before they are able to effect the escape, Rapunzel lets slip to the witch that the prince has been visiting. The witch chops off Rapunzel's hair then takes her to a remote desert. When the prince returns, the witch lowers the Rapunzel's hair. When the prince reaches the summit, the witch tells him he will never see Rapunzel again but before she can kill him, the prince leaps from the tower. He survives but has landed in thorns which blind him, fulfilling the witch's prophecy. Despondent, the prince wanders then land until one day he stumbles upon Rapunzel. Recognizing him, she cries because of what has happened to him. Miraculously, her tears heal his eyes and the couple...and their child...return to the prince's kingdom.