Preheat the oven to 350 degrees. Grease two 8-inch cake pans with gluten-free cooking spray. Set aside.
Combine the sugar, flour, xanthan (if using), cocoa, baking powder, baking soda, and salt in a large mixing bowl. Whisk to combine. Add the eggs, milk, oil and vanilla, and beat until smooth. Carefully whisk in the hot coffee. The batter will be runny.
Evenly distribute the cake batter between the two prepared pans and bake for 30-35 minutes, or until a toothpick inserted in the middle of the cake comes out clean. Let it cool in the pans for 5 minutes, then turn out onto a rack to finish cooling completely.
Make the frosting. Whisk the melted butter into the cocoa powder until thoroughly combined. Alternate adding the sugar with the milk while beating until the frosting is smooth and glossy and a spreadable consistency. If the frosting seems too thick, add a splash of additional milk. If it seems too thin, add additional powdered sugar. Beat in the vanilla extract and salt.
Frost the cooled cakes as desired.