Gastroenteritis is contagious starting from the incubation period, which is usually 24 to 72 hours after infection, through the symptomatic phase, and can remain contagious even after symptoms have resolved for several days or up to 10 days in some cases. The highest contagiousness is during the period when symptoms like diarrhea and vomiting are most intense. Transmission occurs mainly through direct or indirect contact with stool or vomit from an infected person, and strict hygiene measures are essential to prevent spread.