Early weaning of piglets is often accompanied by a severe growth check and diarrhoea. It is well established that this process is multi-factorial and that post-weaning anorexia and undernutrition are major aetiological factors. Gastrointestinal disturbances include alterations in small intestine architecture and enzyme activities. Recent data indicate transiently-increased mucosal permeability, disturbed absorptive–secretory electrolyte balance and altered local inflammatory cytokine patterns after weaning. These responses appear to operate according to two distinct temporal patterns, an acute response followed by a long-lasting adaptation response. Pigs coexist with a diverse and dense commensal microbiota in their gastrointestinal tract. Most of these microbes are beneficial, providing necessary nutrients or protection against harmful pathogens for the host. The microbial colonisation of the porcine intestine begins at birth and follows a rapid succession during the neonatal and weaning period. Following the withdrawal of sow's milk the young piglets are highly susceptible to enteric diseases partly as a result of the altered balance between developing beneficial microbiota and the establishment of intestinal bacterial pathogens. The intestinal immune system of the newborn piglet is poorly developed at birth and undergoes a rapid period of expansion and specialisation that is not achieved before early (commercial) weaning. Here, new insights on the interactions between feed components, the commensal microbiota and the physiology and immunology of the host gastrointestinal tract are highlighted, and some novel dietary strategies are outlined that are focused on improving gut health. Prebiotics and probiotics are clear nutritional options, while convincing evidence is still lacking for other bioactive substances of vegetable origin.