Saint Barbara
According to this story, a wealthy pagan merchant named Dioscorus had an extremely beautiful daughter, Barbara. The father was fearful that she might marry an unworthy suitor so locked her in a tower away from the outside world. Then whilst Discorus was away on an extended trip, Barbara contemplated the teachings of Christ and decided to become a Christian rather than follow her family's heathen gods. When her father returned and heard of this, he was enraged and took her before the Roman pro-consul Martianus. The judge ordered that the girl be tortured until she denounced her beliefs. When Barbara refused to recant, Martianus ordered her to be beheaded which Dioscorus carried out himself, after performing the act he was struck by lighting and consumed by fire.
This tale may not be too similar to the modern rapunzel but it contains the daughter locked in a tower, which then may have begun to grow and change until the tale resurfaced to be written down again.
Petrosinella
In 1634 Italian folklorist Giambattisia Basile's collection of fairy tales was published in Pentamerone. Among these stories was Petrosinella (little parsley). This story is very similar to the modern day Rapunzel, a mother is forced to give up her daughter by an ogress, she has long hair and there is a handsome prince. At the end both escape and the ogress gets eaten by a wolf
Goodreads. Petrosinella: a Neapolitan Rapunzel. (1995) [Online Image] Available from: http://www.goodreads.com/book/show/2605094-petrosinella [Accessed 3rd April 2015]
Persinette
Sixty years later Mademoiselle de la Force used the Italian story as the basis for Persinette (also translates as little parsley) in her Les Contes des contes (tales of tales) published in 1697. However she did make a few changes to the story. It is a fairy not an ogre that raises the girl after she is taken away from her mother and it is in this tale that Persinette becomes pregnant with twins by the prince. They are then tormented by the fairy a guardian-sprite's forgiveness sets them free.
Brothers Grimm
In the late 1700's Persinette was translated into German by the Grimm brothers, small changes were made such as the fairy being more of a dissapointed foster mother than a vengeful harridan and the heroine's name was changed to Rapunzel (a type of lettuce).
The Grimm's original tale goes that a pregnant woman greatly craves some Rapunzel she's seen growing in a neighbors garden to the point where she will eat nothing else. Therefore the husband goes into the garden and gets her some. The fairy who owns the garden stops him trespassing and tries to make him give back the Rapunzel. When he explains he needs it to save his wife she lets him take it, under the promise that they will give her their child when it's born. The fairy takes the child when it's born and calls her Rapunzel. When she's 12 years old and her hair has grown long enough she locks her in a tower where everyday in the evening she calls up Rapunzel, Rapunzel let down your hair' and Rapunzel lets her into the tower. A few years later a prince finds the tower and see's what the fairy does to be let up, the next day he returns and calls the same thing and Rapunzel pulls him up into the tower. They fall in love and the prince visits her everyday. One day Rapunzel asks the fairy 'why are my clothes getting so tight' and the fairy realises Rapunzel is pregnant and someone has been coming to visit her. She cuts of Rapunzel's hair and banishes her from the tower. When the prince comes that evening, the fairy uses Rapunzel's hair to pull him up, then tells him she's died when her arrives in the tower. The prince is so upset he throws himself off the tower, he doesn't die but two thorns poke his eyes out at the bottom. He wanders the forests blind for two years until he finds rapunzel with her twin children, she's so relived to see him she cries into his empty eye sockets and his eyes grow back and they live together.
Simon Kozin. Illustration for the brothers Grimm fairy tale Rapunzel. (2004) [Online Image] Available from: http://commons.wikimedia.org/wiki/File:Illustration_for_the_Brothers_Grimm_fairy_tale_Rapunzel..jpg [Accessed 3rd April 2015]
Between the beginning of the 1800's when Grimm's first published that story to 1857 they brought out six new editions of their book, editing the story heavily each time to fit more with Christian values. By the final version which most people know of today, Rapunzel doesn't fall pregnant and the story is much more embellished and beautiful.
Tangled
In much more recent times. Disney released the film Tangled, based on the story of Rapunzel. In it Rapunzel is already a princess, taken away by mother Gothel because of her magical hair. The prince is replaced by Flynn Ryder, a thief who very reluctantly helps her leave the tower ( the modern day Rapunzel is a lot more assertive, showing the changes in women's position in the 200 years since the Grimm version was published) although the story is only loosely based on the original tale, it is interesting to note that at the end Rapunzel's magical tears heal Flynn from death, based off the end of the Grimm story.
Carniolus. Tangled. (2011) [Online Image] Available from: http://en.wikipedia.org/wiki/File:Tangled_poster.jpg [Accessed 3rd Apirl 2015]