Heat the oven to 350°F. Grease a 9×5-inch loaf pan with nonstick cooking spray. Line with parchment paper if desired for easy removal.
In the bowl of a stand mixer fitted with the paddle attachment, beat the butter, granulated sugar, and brown sugar on medium speed until light and fluffy, about 4–5 minutes.
Add the eggs one at a time, mixing until combined. Add the molasses and mix briefly.
Add the salt, spices, baking powder, and baking soda. Mix on low speed just until combined.
Add the flour and mix until the batter comes together, scraping the sides of the bowl as needed. Do not overmix.
Pour the gingerbread batter into the prepared pan and smooth the top.
Bake for 55–60 minutes, or until a toothpick inserted into the center comes out clean.
Let the loaf cool in the pan for 10 minutes, then transfer to a wire rack to cool completely before glazing.
In a small bowl, whisk together the powdered sugar, vanilla extract, milk, and lemon juice if using.
Add milk a little at a time until the glaze reaches a pourable consistency. Drizzle over the cooled loaf before slicing.
Notes
Make sure ingredients are at room temperature for a smooth batter.
Do not overbake to keep the loaf moist.
The gingerbread flavor develops even more after resting overnight.