Clove comes from Old French clou (nail), from Latin clavus, because the dried flower bud looks like a small nail — most European languages call this spice some variant of 'nail.'
The dried aromatic flower bud of a tropical tree, used as a spice.
From Old French clou de girofle, meaning 'nail of the clove tree,' from Latin clavus (nail). The dried flower bud of the clove tree resembles a small nail, and the word clove is literally 'nail.' The French girofle comes from Latin caryophyllum, from Greek karyophyllon, possibly meaning 'nut-leaf.' Many European languages call the spice some variant of 'nail': French clou, Spanish clavo, Italian chiodo. Key
The clove spice, a clove of garlic, and the past tense 'clove' (as in 'he clove the wood') are three completely unrelated words that happen to share a spelling. The spice is from Latin 'nail,' garlic cloves are from Old English 'to cleave/split,' and the verb is from Old English 'clēofan.'