Preheat the oven to 350°F. Prepare two 8" or 9" round pans with cooking spray and lining the bottom of each pan with parchment.
In a medium mixing bowl, whisk together the multi-purpose flour, cocoa, baking powder, salt, xanthan gum, and 1/2 cup of the sugar.
Place the butter and 1 cup of the sugar in the bowl of a mixer and beat until light and fluffy, about 2 minutes. Add the eggs, buttermilk, water, and vanilla into your mixer bowl, and mix until well blended.
Blend in the dry ingredients 1 cup at a time, beating for 1 minute and scraping the bottom and sides of the bowl after each addition.
Once all of the dry ingredients have been mixed in, beat at medium-high speed for 2 minutes, to make a smooth batter.
Pour the batter equally into the prepared pans. Using a kitchen scale helps to get the batter evenly divided.
Bake the cakes for 30 to 33 minutes, about 3 to 4 minutes past the point where a toothpick inserted into the center of one comes out clean.
Remove the cakes from the oven, and let cool in the pan for 10 minutes. Turn pans over onto a rack and cool cakes completely.
Once cooled, frost cakes, or serve with a dusting of powdered sugar or whipped cream.
For the Chocolate Buttercream Frosting:
In bowl, beat butter until light and fluffy. In a separate bowl, mix confectioner’s sugar with cocoa and espresso.
Add vanilla to milk. Blend sugar mixture with butter and vanilla milk, alternating between the two, beating well after each addition. Beat until smooth.