Preheat oven to 350°F and grease two 9-inch round cake pans, then line with parchment paper.
In a large saucepan, heat the stout and butter until butter melts, then whisk in cocoa powder until smooth and let cool slightly.
In a large bowl, whisk together gluten-free flour, sugar, baking soda, and salt, then add the stout mixture and whisk until combined.
Beat in eggs one at a time, then add sour cream and mix until smooth, divide batter between pans and bake for 30-35 minutes until a toothpick comes out clean.
Let cakes cool completely, then beat cream cheese until fluffy, gradually add powdered sugar and heavy cream, and frost the cooled cake layers.