The only free and comprehensive online etymological dictionary of the Spanish language
zanahoria f. (Noun) "carrot"

14th cent. Old Spanish çanahoria, dialectic variant safanòria. Borrowed from Andalusian Arabic *safunnárya 'id.,' itself borrowed from Ancient Greek σταφυλίνη ἀγρία (staphulíne agría) "wild carrot." σταφυλίνη "carrot" is a diminutive of σταφυλή (staphulé) "grape," of unknown origin. ἀγρία, when referring to plants meaning "wild," is from ἀγρός (agrós) "field" (see agro).

Romance: Western Vulgar Latin: Catalan (Mallorca) safanària