How is vinegar made? Well, it is basically sour wine. And guess what? Vinegar literally means “sour wine”! Vine- is Latin for “wine” and the ‑egar comes from the Latin aigre meaning “sour.”
This makes vinegar directly related to the Spanish word for sour: agrio!
(It also makes it related to the Spanish for wine, vino, but that one is too obvious).