Diarrhea that goes on for weeks or months can be caused by an infection, underlying medical condition, or certain foods. Celiac disease, food allergies or intolerances, medications, irritable bowel syndrome, or inflammatory bowel disease can all cause chronic diarrhea and should be evaluated by your healthcare provider.