Preheat oven and prepare the cake pans. Adjust oven rack to center position. Grease two 8-inch round cake pans with gluten-free nonstick cooking spray. Preheat oven to 350 degrees F.
Make the Batter. Whisk together gluten-free flour, sugar, baking powder, and salt in a large bowl. Add oil, milk, eggs, and vanilla extract. Blend until smooth.
Bake the Cakes. Divide batter equally between the two prepared cake pans. Bake until a cake tester inserted into the center of the cake comes out clean, about 30 minutes.
Cool. Remove pans from the oven. Allow cakes to cool in the pan for five minutes and then turn out onto a wire rack to cool completely.
Prepare chocolate frosting. Whisk together powdered sugar, cocoa powder, and salt in a small bowl.
Frost Cake. When cake is cool, fill and frost the cake.
This recipe was tested with Bob's Red Mill 1:1 Gluten-Free Flour Blend. Replacing the flour with another brand might change the texture of the cake. Be sure to use a flour blend that contains xanthan gum. If it doesn't, add 1 teaspoon of xanthan gum to the flour. Whisk to combine. Then use as directed.
Lightly grease a 9 x13-inch pan. Bake the cake until golden brown about 40. Allow cake to cool in the pan. Prepare frosting as directed above and frost cake when cool.
Line two 12-cup muffin pans with cupcake liners. Spoon batter into muffin cups, about 2/3 full. Bake until a toothpick inserted into the center of the cake comes out clean, about 20 minutes. Prepare frosting and frost cupcakes when cool.