The gastrointestinal (GI) microbiome of cats and dogs is increasingly recognized as a metabolically active organ inextricably linked to pet health. Food serves as a substrate for the GI microbiome of cats and dogs and plays a significant role in defining the composition and metabolism of the GI microbiome. The microbiome, in turn, facilitates the host’s nutrient digestion and the production of postbiotics, which are bacterially derived compounds that can influence pet health. Consequently, pet owners have a role in shaping the microbiome of cats and dogs through the food they choose to provide. Yet, a clear understanding of the impact these food choices have on the microbiome, and thus on the overall health of the pet, is lacking. Pet foods are formulated to contain the typical nutritional building blocks of carbohydrates, proteins, and fats, but increasingly include microbiome-targeted ingredients, such as prebiotics and probiotics. Each of these categories, as well as their relative proportions in food, can affect the composition and/or function of the microbiome. Accumulating evidence suggests that dietary components may impact not only GI disease, but also allergies, oral health, weight management, diabetes, and kidney disease through changes in the GI microbiome. Until recently, the focus of microbiome research was to characterize alterations in microbiome composition in disease states, while less research effort has been devoted to understanding how changes in nutrition can influence pet health by modifying the microbiome function. This review summarizes the impact of pet food nutritional components on the composition and function of the microbiome and examines evidence for the role of nutrition in impacting host health through the microbiome in a variety of disease states. Understanding how nutrition can modulate GI microbiome composition and function may reveal new avenues for enhancing the health and resilience of cats and dogs.