Vomiting or diarrhea can be caused by illnesses such as viral infections, intestinal parasites or gastroenteritis. These can also occur if your dog eats harmful human food, a toxic plant or something poisonous such as human medication or insecticides.