It is descended from Old English wé, which was pronounced something like way in modern English. It is related to German wir, Dutch wij, Frisian wy, and Danish vi.
See also: