Preheat oven to 350°F (175°C). Grease two 8-inch round cake pans, line with parchment, and dust with cocoa powder.
In a large bowl, sift together the gluten-free flour, cocoa powder, sugar, baking powder, baking soda, and salt.
In a medium bowl, whisk together the buttermilk, oil, eggs, and vanilla until fully emulsified.
Pour the wet ingredients into the dry ingredients and beat on low speed just until combined.
Slowly pour in the hot espresso while mixing on the lowest speed. The batter will be very thin.
Allow the batter to rest for 15 minutes so the gluten-free flour can hydrate.
Divide batter evenly between pans and bake for 30-35 minutes until a skewer comes out clean.
Cool in pans for 10 minutes, then invert onto a wire rack to cool completely before frosting.