To make the cupcakes, preheat oven to 350 F. Line a cupcake tin with liners and set aside. Combine stout and butter in a medium saucepan over medium heat. Add the cocoa and whisk until smooth. Remove from heat and allow to cool slightly. In a large mixing bowl combine the flour, sugar, baking soda and salt. In the bowl of an electric mixer beat together the eggs and sour cream to blend. Add stout mixture and beat to combine. Mix in dry ingredients on low until incorporated. Divide batter among cupcake liner about 2/3 full and bake until an inserted toothpick comes out clean, about 15 minutes. Cool completely.
To make the ganache, place chocolate in heatproof bowl. Heat cream in saucepan until simmering, then pour over chocolate, let sit for 1 minute, then stir until smooth. Add butter and Bailey's and stir until combined. Set aside until cool and thick enough to be piped (you can use the refrigerator to speed the process but stir every 10 minutes to ensure even cooling). Meanwhile, cut a portion from the center of the cupcake using the cone method and once the ganache is of the right consistency, pipe the ganache into the centers.
To make the frosting, place the butter in the bowl of a stand mixer and beat on medium high until light and fluffy. Gradually add powdered sugar until incorporated. Mix in Bailey's until smooth. Add more if necessary until frosting has reached a good consistency for piping or spreading. Frost the cupcakes as desired and enjoy!