E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
The best used to be made at Grantham, and Grantham gingerbread was as much a locution as Everton toffy, or tuffy as we used to call it in the first half of the nineteenth century.
To get the gilt off the gingerbread. To appropriate all the fun or profit and leave the caput mortuum behind. In the first half of the nineteenth century gingerbread cakes were profusely decorated with gold-leaf or Dutch-leaf, which looked like gold.