Gastroenteritis is an inflammation of the lining of the intestines caused by a virus, bacteria or parasites. It spreads through contaminated food or water, and contact with an infected person. The best prevention is frequent hand washing. The most common problem with gastroenteritis is dehydration. This happens if you do not drink enough fluids to replace what you lose through vomiting and diarrhea. Dehydration is most common in babies, young children, the elderly and people with weak immune systems.