Preheat the oven to 350°F (175°C). Grease three 8-inch cake pans and line the bottoms with parchment paper.
In a medium bowl, whisk together the gluten-free flour, cocoa powder, baking powder, baking soda, salt, and gum (if using). Set aside.
In the bowl of a stand mixer, combine granulated sugar, brown sugar, eggs, milk, sour cream, avocado oil, apple cider vinegar, and vanilla extract. Beat on medium speed until smooth and well combined.
With the mixer on low, gradually add the dry ingredients to the wet mixture. Scrape the bowl as needed to ensure it’s all incorporated.
Slowly stream in the hot coffee while the mixer is on low. Mix until the batter is smooth (batter will be thin).
Evenly divide the cake batter among the three prepared cake tins. Bake for 25–30 minutes, or until a toothpick inserted in the center comes out clean (start checking at 20 minutes).
Allow cakes to cool in the pans for 10 minutes before turning out onto a wire rack. Let them cool completely on the cooling rack. For best assembly, wrap and chill the cake layers in the refrigerator for at least 1 hour.