Origins
The English word "gratin" was borrowed from French in the early 19th century. In French, "gratin" originally referred to the crust that formed on food during baking — specifically, the layer that stuck to the cooking vessel and had to be scraped off. The term derives from "gratiner" (to brown the surface of a dish), from "gratter" (to scrape, to scratch).
Old French "gratter" came from Frankish *krattōn (to scrape), a Germanic loanword connected to Old High German "krazzōn" (to scratch), the ancestor of modern German "kratzen." The Proto-Germanic root is *krattōną, meaning to scratch or scrape.
Figurative Development
The phrase "au gratin" literally translates as "with the scrapings" — what we now celebrate as a golden, bubbling topping was originally the residue stuck to the pan. French also uses "le gratin" as slang for high society, mirroring the English expression "upper crust." Both languages independently landed on the same culinary metaphor for social elites.