In the case of the character from J. M. Barrie's play 'Peter Pan' (1904), it was created from the nickname fwendy
"friend", given to the author by a young friend. However, the name was used prior to the play (rarely), in which case it could be related to the Welsh name GWENDOLEN
and other names beginning with the element gwen
meaning "white, fair, blessed".