As research into gut microbiota deepens, the impact of diet on the composition of human gut microbiota and their metabolites has gradually become a focal point. This paper reviews recent advancements in understanding how diet influences gut microbiota composition and their metabolic products. Firstly, it introduces the basic concepts of gut microbiota and their role in maintaining health. Next, it explores the effects of different types of diets (such as high-fiber, high-fat, high-protein, and refined sugar diets) on the composition of gut microbiota and analyzes their impact on microbiota diversity. Then, it discusses the influence of diet on gut microbiota metabolites, including short-chain fatty acids, amino acid metabolites, and gases. Further, it examines the practical applications of dietary interventions on health, especially their potential impact on chronic diseases. Finally, the paper summarizes the limitations of current research and suggests future research directions and challenges. Overall, the influence of diet on gut microbiota and their metabolites holds profound health significance and provides important evidence for formulating scientific dietary recommendations.