Gut bacteria influence the production of neurotransmitters therefore it can influence how you 'experience' an emotion. A misbalance in your gut microbiome and the brain's reactions ca be influenced - e.g. cannot transmit effective enough different signals.
To clear out any misunderstanding, your gut microbiome cannot 'make' you feel anything on its own. It can either make it easier or more difficult to experience certain emotions.
This is an emerging field - look at these 2 publications and see how questionable the conclusions can be: