Guarantee and warranty are the same word. Both descend from a Germanic root meaning to guard or protect, which entered French from Frankish. Norman French kept the initial w; central Parisian French turned it into gu-. English borrowed from both dialects at different dates and ended up with two words, now specialised into different legal jobs.
The gu- spelling is the marker. Warden and guardian are the same pair, as are warranty and guarantee, and each time the w- form is the earlier Norman one. English took garrant in the early 1400s and then guarantee in the 1670s, the later form probably shaped by Spanish garante or by confusion with the legal ending -ee. Strictly the pledge itself should be a guaranty and the person giving it a guarantee, a distinction that developed in the 1700s and that almost nobody observes.
guarantee (n.) 1670s, "person that gives security," altered (perhaps via Spanish garante or confusion with legalese ending -ee ), from earlier garrant "warrant that the title to a property is true" (early 15c.), from Old French garant "defender, protector; warranty; pledge; justifying evidence," from a Germanic source, from Proto-Germanic *war- "to warn, guard, protect," from PIE root *wer- (4) "to cover." For form evolution, see gu- . Sense of the "pledge" itself (which is properly a guaranty ) developed 18c. also from 1670s guarantee (v.) 1791, "to be surety for," from guarantee (n.). Garanten in this sense is from early 15c. Related: Guaranteed ; guaranteeing . also from 1791