Per The Straight Dope:
J. M. Barrie did not invent the name Wendy for his 1904 play Peter Pan, the Boy Who Wouldn't Grow Up (the book form of the story, Peter and Wendy, was published in 1911). He did popularize it, though. Barrie apparently was inspired to use the name by a young friend named Margaret Henley, the daughter of writer William Henley. Margaret, who died around 1895 at age 6, called Barrie her "friendy." Since she couldn't pronounce her Rs at the time, the word came out "fwendy," or "fwendy-wendy," in some versions of the story.
But we have absolute proof that there were earlier Wendys, thanks to the just-released 1880 U.S. Census and the 1881 British Census (available here). These documents show that the name Wendy, while not common, was indeed used in both the U.S. and Great Britain throughout the 1800s. I had no trouble finding twenty females with the first name Wendy in the United States, the earliest being Wendy Gram of Ohio (born in 1828). If you include such spelling variations as Windy, Wendi, Wenda, and Wandy the number triples.
As to the origins of said name, websites here and here make the claim that Wendy is a derivative of the name Gwendolen or maybe Gwendolyn. Looking further, I chanced upon World Wide Wendy, a site dedicated to, well, all things Wendy. On this site, Doctor of Folklore Leslie Ellen Jones discusses the possible Welsh origins of the name Gwendolyn and its derivative Wendy. In both the English and U.S. Census, however, the name Wendy is also used as a male first name, so I suspect further research may be required.
Of course, if you go back a few centuries and head east a mite, we have the Chinese emperor Wendi of the Sui dynasty (541-604), and before that the Great Emperor Wendi of the Han dynasty (179 BC-157 BC). But that's stretching it a bit far, don'tcha think?