The Christmas Cracker was invented by a London confectioner named Tom Smith around 1847. Mr. Smith had fallen in love with the French Bon-Bon, a sugared almond candy twisted in waxed paper. He brought the idea back to England and toyed around with ever more elaborate models for several years.
Eventually he settled on a cardboard tube wrapped in paper with a twist of saltpeter on each end. When pulled apart, it created a spark and a loud bang. People called them cosaques after the sound of a Russian Cossack whip makes. We know them today as crackers.
The word gingerbread is a corruption of the Old French word gingebras which means "preserved ginger." The spice was introduced into Europe in the 11th Century by Crusaders. But like so many Eastern spices, only the wealthy could afford it.
During the Middles Ages in Germany, only members of the gingerbread bakers guild -- Lebkucher -- were allowed to make it. The City of Nuremberg became known as the gingerbread capitol of the world. Ladies gave gingerbread cakes to their favorites knights. Queen Elizabeth I gave gingerbread made in the image of the recipient as Christmas gifts.
The Grimm Brothers' tales about Hanzel and Gretel popularizzed gingerbread in the 19th Century.
Resources:Ten Ages of Christmas, BBC History
Christmas Crackers -- Tom Smith and the History of the Christmas Cracker; About.com Collectibles
London Christmas Past: The Invention of the Christmas Cracker; Londonist
The History of Gingerbread; WWWiz Magazine
Gingerbread Throughout History, A Sweet Holiday Retrospective; Eat, Drink and Really Be Merry
Lady Barbara Fleming's Gingerbreads 1673; Historic Food