English has three words for essentially the same thing — warrant, warranty, and guarantee — because the same Germanic root entered the language three times by three different routes.
The source is Frankish *warand, meaning 'authorisation' or 'protection', from Proto-Germanic *war- ('to watch, to guard'). When the Franks settled in Gaul, their legal vocabulary was absorbed into Old French. The Frankish w- became French g- — a regular sound change that also turned William into Guillaume and war into guerre.
Warrant entered English first, through Norman French after 1066, keeping its w- because Norman dialect preserved the Germanic consonant. Warranty followed through Anglo-French legal usage. Guarantee arrived latest, in the 1670s, through standard French or Spanish — languages that had completed the w-to-g shift.
The deeper Germanic root *war- ('to watch') connects guarantee to an even larger family. Guard, warden, ward, and garrison all descend from it. A guarantee is, at its etymological core, a promise backed by watchfulness — someone standing guard over an agreement.
The spelling guarantee with its unusual -ee ending reflects the French suffix -ée, marking it as a thing received. A guarantee is something given to you; a guarantor is the one who gives it.