2 cups all-purpose flour
1/2 cup sugar
2 teaspoons ground ginger
1/4 teaspoon ground allspice
1 teaspoon ground cinnamon
1 cup molasses
8 tablespoons (1 stick) unsalted butter cut into 1/2-inch pieces, softened
2 large eggs, room temperature
2 teaspoons baking soda
1 cup boiling water
Adjust an oven rack to the middle position and heat the oven to 350 degrees. Grease and flour a 9-inch square baking pan. Whisk the flour, sugar, ginger, allspice, and cinnamon in a large bowl. Stir the molasses, butter, and eggs together in a medium bowl (some pieces of butter will remain).
Make a well in the center of the flour mixture. Add the molasses mixture to the well and stir until well blended. Stir the baking soda and boiling water together in a medium liquid measuring cup, pour over the batter, and stir until the butter is completely melted. Scrape the batter into the prepared pan and bake until a toothpick inserted in the center of the cake comes out clean, 30 to 40 minutes. Cool completely in the pan, at least 1 hour. Serve. (The cake can be stored at room temperature for up to 4 days.)