Origin of wraith
Wraith reaches English through Scots and Old Norse. Wraith today means “A ghost or specter, especially a person's likeness seen just after their death”.
Etymology of wraith
Borrowed from Middle Scots wraith, first attested in 1513 in a translation of the Aeneid. The word has no certain etymology; it may be a transferred use of Middle Scots wraith, wrath (nominally "anger, rage", adjectivally "angry, wrathful"), thus connecting it to writhe and making it a doublet of wrath and wroth. The old Century Dictionary compares Old Norse vǫrðr (“guardian”).
Etymology text from Wiktionary (CC BY-SA 4.0). Asterisked forms are reconstructed, not attested.