Gamma-proteobacteria is a class of gram-negative opportunistic pathogens existing in the intestinal flora, often leading to diarrhea and intestinal infectious diseases, and plays an important role in maintaining intestinal homeostasis. Type III secretion system (T3SS), an important virulence system, is closely related to the adhesion and invasion and pathogenicity to host cells. Therefore, anti-virulence agents targeting T3SS are important strategies for controlling pathogenic infections. In this study, the anti-Salmonella T3SS active compounds neochebulagic acid (1), ellagic acid (2) and urolithin M5 (3) were isolated from seed extract of Terminalia citrina by activity-guided isolation method. Based on the fact that urolithins are the main and stable intestinal microbiota metabolites of hydrolysable tannins, we found that the metabolite urolithin B repressed translation and secretion of SipC through the Hha–H-NS–HilD–HilC–RtsA–HilA regulatory pathway. The results provide evidence for Terminalia seeds and ellagitannin-rich berries and nuts in regulating intestinal homeostasis and treating bacterial infection.