The painful symptoms of irritable bowel syndrome (IBS) are caused by bacteria in the gut. Some patients are still told it’s all in their heads. For many years, doctors blamed the brain for the gut problems linked to irritable bowel syndrome, calling it a psychological condition.