Preheat oven to 350°F (175°C) and grease a 9-inch round cake pan.
In a saucepan, heat Guinness and butter until melted.
Whisk in cocoa powder until smooth and let cool slightly.
In a bowl, combine flour, sugar, baking soda, and salt.
In another bowl, beat eggs and sour cream until smooth.
Mix cooled stout mixture into egg mixture.
Gradually fold dry ingredients into wet ingredients until combined.
Pour batter into prepared pan and bake for 40–45 minutes.
Cool completely before frosting.
Beat cream cheese and butter until creamy.
Add powdered sugar gradually and mix until smooth.
Stir in vanilla extract.
Spread frosting evenly over cooled cake and serve.