A gastrointestinal infection occurs when harmful bacteria, viruses, or parasites invade the digestive system, leading to inflammation and discomfort. These infections affect the stomach and intestines, often causing symptoms like diarrhea, vomiting, and stomach cramps. You might have experienced it after eating contaminated food or drinking unsafe water, where the infection quickly disrupts your body’s normal digestion and causes illness.