The potential role of the intestinal microbiota in modulating visceral pain has received increasing attention during recent years. This has led to the identification of signaling pathways that have been implicated in communication between gut bacteria and peripheral pain pathways. In addition to the well-characterised impact of the microbiota on the immune system, which in turn affects nociceptor excitability, bacteria can modulate visceral afferent pathways by effects on enterocytes, enteroendocrine cells and the neurons themselves. Proteases produced by bacteria, or by host cells in response to bacteria, can increase or decrease the excitability of nociceptive dorsal root ganglion (DRG) neurons depending on the receptor activated. Short chain fatty acids generated by colonic bacteria are involved in gut-brain communication, and intracolonic short chain fatty acids have pro-nociceptive effects in rodents but may be anti-nociceptive in humans. Gut bacteria modulate the synthesis and release of enteroendocrine cell mediators including serotonin and glucagon-like peptide-1, which activate extrinsic afferent neurons. Deciphering the complex interactions between visceral afferent neurons and the gut microbiota may lead to the development of improved probiotic therapies for visceral pain.