Preheat oven to 350°F. Prepare your pans. Lightly grease two 8" round cake pans with nonstick cooking spray.
Rub sugar together with the lemon zest until fragrant in a large bowl.
Add the gluten-free flour, baking powder, and salt. Whisk to combine. Add the milk, oil, eggs, lemon juice, and extract. Stir until a thick batter forms.
Scrape the bottom of the bowl to make sure all the dry ingredients are incorporated. Give the batter a final stir.
Bake until the cake is golden brown and a cake tester inserted into the center comes out clean or with a few moist crumbs, about 30 minutes.
Let the cakes cool for 10 minutes in the pan. Turn them out onto a wire rack to cool completely before frosting. This takes about 1 hour..
Prepare the frosting. Mix the butter until light and creamy in a large bowl. Add the powdered sugar, lemon juice, milk, lemon zest, and salt. Mix until smooth and creamy. If frosting is too thin, add an additional ½cup powdered sugar. If it’s too thick, add another tablespoon of milk.
Fill and frost the cake. If the frosting gets very warm, chill the frosted cake for 30 minutes before serving.
Cover the leftover cake and store for up to three days. You can freeze the frosted cake in a freezer container for up to three months.
Note 1 Gluten-Free Flour. I tested the recipe with Bob’s Red Mill 1:1 Gluten-Free Baking Flour. Since gluten-free flour blends vary so much from brand to brand, using a different one might change the texture of the cake.
Note 2 Cupcakes. This recipe makes about 24 cupcakes. Spoon the batter into paper-lined cupcake pans and bake until set, about 20 minutes.
Note 3. Sheet Cake. To make a sheet cake, spread batter into a greased 9x13-inch pan. Bake until golden brown and a cake tester inserted into the center comes out clean, about 40 minutes.