Domesticated animals experienced profound changes in diet, environment, and social interactions that likely shaped their gut microbiota and were potentially analogous to ecological changes experienced by humans during industrialization. Comparing the gut microbiota of wild and domesticated mammals plus chimpanzees and humans, we found a strong signal of domestication in overall gut microbial community composition and similar changes in composition with domestication and industrialization. Reciprocal diet switches within mouse and canid dyads demonstrated the critical role of diet in shaping the domesticated gut microbiota. Notably, we succeeded in recovering wild-like microbiota in domesticated mice through experimental colonization. Although fundamentally different processes, we conclude that domestication and industrialization have impacted the gut microbiota in related ways, likely through shared ecological change. Our findings highlight the utility, and limitations, of domesticated animal models for human research and the importance of studying wild animals and non-industrialized humans for interrogating signals of host-microbial coevolution.