A gastrointestinal (GI) infection is an infection of the digestive tract, most commonly the stomach and intestines, caused by a virus, bacterium, or parasite. Globally, unsafe food alone causes 600 million cases of foodborne illness every year, making GI infections one of the most common reasons people get sick. Most cases resolve on their own within a few days, but some can lead to serious dehydration or longer-lasting digestive problems.
What Causes GI Infections
Viruses are responsible for about 60% of all GI infections. Norovirus is the single biggest culprit, accounting for half of all viral cases. Rotavirus, adenovirus, and astrovirus also cause infections, particularly in young children. Viral GI infections spread easily through person-to-person contact, contaminated surfaces, and food or water.
Bacterial infections make up a smaller but often more severe category. The most common bacterial causes include Salmonella, Campylobacter, E. coli, Shigella, and C. diff. These bacteria typically enter the body through undercooked meat, unpasteurized dairy, contaminated produce, or contact with infected animals. Bacterial infections are more likely than viral ones to cause bloody diarrhea and high fevers.
Parasites like Giardia and Cryptosporidium cause infections that tend to last longer than viral or bacterial ones, sometimes weeks. Parasitic infections often come from contaminated water sources, including streams, lakes, and poorly treated municipal water, and are a particular concern for travelers.
Common Symptoms
The hallmark symptoms of a GI infection are diarrhea, nausea, vomiting, and abdominal cramps. Many people also experience fever, body aches, and fatigue. The combination of vomiting and diarrhea is why GI infections are often called “stomach flu,” though they have nothing to do with influenza.
The type of pathogen influences what symptoms look like. Viral infections tend to produce watery diarrhea with vomiting, while bacterial infections are more likely to cause bloody or mucus-filled stool and higher fevers. Parasitic infections often cause prolonged, intermittent diarrhea with bloating and gas but less vomiting.
How the Gut Loses Fluid
GI infections cause diarrhea through a few different mechanisms. Some pathogens produce toxins that force the intestinal lining to actively pump water and electrolytes into the gut, resulting in large-volume watery diarrhea that can exceed a liter per day. Others damage the intestinal wall directly, triggering inflammation and preventing normal nutrient and water absorption. Invasive bacteria and parasites can cause visible blood or pus in the stool by breaking through the gut lining. In many infections, increased gut motility (the intestines contracting faster than normal) pushes contents through before water can be reabsorbed.
How Long It Lasts
Timing varies significantly depending on the cause. Norovirus has an incubation period of 12 to 48 hours, meaning symptoms can appear as quickly as half a day after exposure. Most people recover fully within one to three days. Bacterial infections like Salmonella typically take 12 to 72 hours to develop symptoms and can last four to seven days. Parasitic infections have the longest timeline: Giardia symptoms may not appear for one to three weeks after exposure and can persist for two to six weeks without treatment.
Dehydration: The Main Danger
The biggest risk from any GI infection is dehydration, especially in young children, older adults, and people with weakened immune systems. When the body loses more fluid through vomiting and diarrhea than it can take in, organs start to struggle.
In adults, signs of dehydration include extreme thirst, dark-colored urine, urinating less than usual, dizziness, confusion, and fatigue. You can check by pinching the skin on the back of your hand: if it doesn’t flatten back immediately, you’re likely dehydrated. In infants and young children, watch for no wet diapers for three hours, no tears when crying, sunken eyes, a sunken soft spot on the skull, and unusual crankiness or lethargy.
Seek medical attention if diarrhea has lasted more than 24 hours, you can’t keep fluids down, there’s blood or black color in the stool, or a fever reaches 102°F or higher.
How GI Infections Are Diagnosed
Many mild cases never need a formal diagnosis. Your body fights off the infection, and symptoms resolve before testing would even return results. But when symptoms are severe, bloody, or prolonged, testing can identify the specific pathogen causing the problem.
Modern stool testing uses a technology called PCR (a method that detects genetic material from pathogens), which can identify dozens of viruses, bacteria, and parasites from a single sample. These panels are significantly more sensitive than older culture-based methods, catching pathogens even when they’re present in very small numbers. One limitation: PCR can detect genetic material from dead organisms, so a positive result doesn’t always mean an active infection. This is why the test shouldn’t be repeated within seven days or used to confirm you’ve recovered.
Treatment and Recovery
For most GI infections, treatment is straightforward: replace lost fluids and wait. Oral rehydration is the priority. Water alone isn’t ideal because it doesn’t replace the sodium and potassium being lost. Oral rehydration solutions, broths, and electrolyte drinks are better choices. Small, frequent sips work better than large gulps, especially when nausea is still present.
Antibiotics are not helpful for most GI infections and can sometimes make things worse. Since viruses cause the majority of cases, antibiotics simply don’t apply. Even some bacterial infections, like certain E. coli strains, can become more dangerous with antibiotic treatment. Antibiotics are generally reserved for cases involving high fever or bloody diarrhea where testing confirms a pathogen like Shigella, Salmonella, or Campylobacter that responds to treatment. Anti-diarrheal medications can also carry risks by slowing the body’s ability to clear the infection, so they’re best avoided unless recommended by a provider.
Most people can start eating bland foods as soon as they feel up to it. There’s no need to follow strict dietary rules, but plain carbohydrates like rice, toast, and bananas tend to be easiest to tolerate early on.
Long-Term Digestive Effects
Most GI infections leave no lasting trace. But a subset of people develop persistent digestive symptoms after the infection clears, a condition called post-infectious irritable bowel syndrome (PI-IBS). Studies show that anywhere from 4% to 36% of people who have a significant enteric infection go on to develop new IBS symptoms, including chronic abdominal pain, bloating, and altered bowel habits. The risk is highest after more severe infections. Campylobacter infections carry a 9% to 13% risk, while dual infections with multiple pathogens have been associated with rates as high as 36% at two years.
These symptoms can take months to fully resolve. If you notice that your digestion hasn’t returned to normal several weeks after a GI infection, the lingering symptoms are a recognized medical phenomenon, not something you’re imagining.
Prevention
The most effective prevention is handwashing with soap and water, particularly before eating, after using the bathroom, and after changing diapers. One important detail: alcohol-based hand sanitizers do not work well against norovirus, the most common cause of GI infections. The CDC specifically recommends soap and water over sanitizer for norovirus prevention. You can use sanitizer as a supplement, but it’s not a substitute.
Food safety practices make a significant difference. Cook meats to recommended temperatures, refrigerate leftovers within two hours, wash produce thoroughly, and avoid unpasteurized dairy and juice. When traveling to areas with less reliable water treatment, stick to bottled or boiled water and avoid ice, raw vegetables, and unpeeled fruit. Separating raw meat from other foods during preparation and cleaning cutting boards and counters between uses prevents cross-contamination, one of the most common ways bacteria spread in home kitchens.