early 13c., "flat or comparatively thin mass of baked dough," from Old Norse kaka "cake," from West Germanic *kokon- (source also of Middle Dutch koke, Dutch koek "a cake, gingerbread, dumpling," Old High German huohho, German Kuchen "a cake, a tart"). Not believed to be related to Latin coquere "to cook," as formerly supposed. Replaced its Old English cognate, coecel.
What man, I trow ye raue, Wolde ye bothe eate your cake and haue your cake? ["The Proverbs & Epigrams of John Heywood," 1562]
Extended mid-15c. to any flat, rounded mass. From early 15c. extended to "a light composition of flour, sugar, butter and other ingredients baked in any form." To take the cake "win all, rank first" (often ironic) is from 1847, American English; piece of cake "something easy" is from 1936. The let them eat cake story is found in Rousseau's "Confessions," in reference to an incident c. 1740, long before Marie Antoinette, though it has been associated with her since c. 1870; it apparently was a chestnut in the French royal family that had been told of other princesses and queens before her.