It is now widely recognized that gut microbiota plays a critical role not only in the development and progression of diseases, but also in its susceptibility to dietary patterns, food composition, and nutritional intake. In this comprehensive review, we have compiled the latest findings on the effects of food nutrients and bioactive compounds on the gut microbiota. The research indicates that certain components, such as unsaturated fatty acids, dietary fiber, and protein have a significant impact on the composition of bile salts and short-chain fatty acids through catabolic processes, thereby influencing the gut microbiota. Additionally, these compounds also have an effect on the ratio of Firmicutes to Bacteroides, as well as the abundance of specific species like Akkermansia muciniphila. The gut microbiota has been found to play a role in altering the absorption and metabolism of nutrients, bioactive compounds, and drugs, adding another layer of complexity to the interaction between food and gut microbiota, which often requires long-term adaptation to yield substantial outcomes. In conclusion, understanding the relationship between food compounds and gut microbiota can offer valuable insights into the potential therapeutic applications of food and dietary interventions in various diseases and health conditions.