1725, "burnt sugar," from French caramel "burnt sugar" (17c.), from Old Spanish caramel (modern caramelo), which is of uncertain origin, probably ultimately from Medieval Latin cannamellis, which is traditionally from Latin canna (see cane (n.)) + mellis, genitive of mel "honey" (from PIE root *melit- "honey"). But some give the Medieval Latin word an Arabic origin, or trace it to Latin calamus "reed, cane."
The word was being used by 1884 of a dark-colored creamy candy and by 1909 as a color-name.