Gut microbes programme their metabolism to suit intestinal conditions and convert dietary components into a panel of small molecules that ultimately affect host physiology. To unveil what is behind the effects of key dietary components on microbial functions and the way they modulate host-microbe interaction, we used for the first time a multi-omic approach that goes behind the mere gut phylogenetic composition and provides an overall picture of the functional repertoire in 27 fecal samples from omnivorous, vegan and vegetarian volunteers. Based on our data, vegan and vegetarian diets were associated to the highest abundance of microbial genes/proteins responsible for cell motility, carbohydrate- and protein-hydrolyzing enzymes, transport systems and the synthesis of essential amino acids and vitamins. A positive correlation was observed when intake of fiber and the relative fecal abundance of flagellin were compared. Microbial cells and flagellin extracted from fecal samples of 61 healthy donors modulated the viability of the human (HT29) colon carcinoma cells and the host response through the stimulation of the expression of Toll-like receptor 5, lectin RegIIIα and three interleukins (IL-8, IL-22 and IL-23). Our findings concretize a further and relevant milestone on how the diet may prevent/mitigate disease risk.