In "Sir Gawain and the Green Knight" Gawain is sometimes spelled Wawain. I don't know for sure why this is so, but the different spelling can also be noted in the original Middle English text.
My - educated, hopefully - guess is, that the different spelling has its origin in the different pronounciation of the Welsh (or Celtic) "Gw".
Gawain seems to appear first in Monmouth's Historia Regum Britanniae (as Walgainus, though in Latin the name seems to also appear as Galvaginus and Galvanus) and is frequently identified with Gwalchmai ('hawk of May') of Celtic history (and/or mythology), though some authors (including R. Graves) note that the name Gawain derives from Gwalchgwyn ('white hawk') rather than from Gwalchmai.
William of Malmesbury mentions Gawain as a nephew of King Arthur who took part in a battle against a brother of Hengest (Horsa?). Historically this would place Gawain into the middle of the 5th century CE, whereas the poem was written sometime around 1400.