It is descended from Old Englishwé, which was pronounced something like way in modern English. It is related to Germanwir, Dutchwij, Frisianwy, and Danishvi.
...
German-Dutch school of the fourteenth and fifteenth
centuries, and with the "Confessions" of Augustine
and John Bunyan's Pilgrim's Progress it occupies a
front ...