Gastroenteritis is usually caused by viruses. However, bacteria, parasites, and fungus can also cause gastroenteritis. In children, rotavirus is the most common cause of severe disease. In adults, norovirus and Campylobacter are common causes. Eating improperly prepared food, drinking contaminated water or close contact with a person who is infected can spread the disease. Treatment is generally the same with or without a definitive diagnosis, so testing to confirm is usually not needed.

Norovirus is the leading cause of gastroenteritis among adults in America, causing greater than 90% of outbreaks. These localized epidemics typically occur when groups of people spend time in close physical proximity to each other, such as on cruise ships, in hospitals, or in restaurants. People may remain infectious even after their diarrhea has ended. Norovirus is the cause of about 10% of cases in children.

A number of parasites can cause gastroenteritis. Giardia lamblia is most common, but Entamoeba histolytica, Cryptosporidium spp., and other species have also been implicated. As a group, these agents comprise about 10% of cases in children. Giardia occurs more commonly in the developing world, but this type of illness can occur nearly everywhere. It occurs more commonly in persons who have traveled to areas with high prevalence, children who attend day care, men who have sex with men, and following disasters.

There are a number of non-infectious causes of inflammation of the gastrointestinal tract. Some of the more common include medications (like NSAIDs), certain foods such as lactose (in those who are intolerant), and gluten (in those with celiac disease). Crohn's disease is also a non-infectious source of (often severe) gastroenteritis. Disease secondary to toxins may also occur. Some food-related conditions associated with nausea, vomiting, and diarrhea include: ciguatera poisoning due to consumption of contaminated predatory fish, scombroid associated with the consumption of certain types of spoiled fish, tetrodotoxin poisoning from the consumption of puffer fish among others, and botulism typically due to improperly preserved food.

However, stool cultures should be performed in those with blood in the stool, those who might have been exposed to food poisoning, and those who have recently traveled to the developing world. It may also be appropriate in children younger than 5, old people, and those with poor immune function. Diagnostic testing may also be done for surveillance. As hypoglycemia occurs in approximately 10% of infants and young children, measuring serum glucose in this population is recommended. Electrolytes and kidney function should also be checked when there is a concern about severe dehydration.

Due to both its effectiveness and safety, in 2009 the World Health Organization recommended that the rotavirus vaccine be offered to all children globally. Two commercial rotavirus vaccines exist and several more are in development. In Africa and Asia these vaccines reduced severe disease among infants and countries that have put in place national immunization programs have seen a decline in the rates and severity of disease. This vaccine may also prevent illness in non-vaccinated children by reducing the number of circulating infections. Since 2000, the implementation of a rotavirus vaccination program in the United States has substantially decreased the number of cases of diarrhea by as much as 80 percent. The first dose of vaccine should be given to infants between 6 and 15 weeks of age. The oral cholera vaccine has been found to be 5060% effective over 2 years.

Antiemetic medications may be helpful for treating vomiting in children. Ondansetron has some utility, with a single dose being associated with less need for intravenous fluids, fewer hospitalizations, and decreased vomiting. Metoclopramide might also be helpful. However, the use of ondansetron might possibly be linked to an increased rate of return to hospital in children. The intravenous preparation of ondansetron may be given orally if clinical judgment warrants. Dimenhydrinate, while reducing vomiting, does not appear to have a significant clinical benefit.