Overweight and obesity are associated with several cardiometabolic risk factors, including insulin resistance, type 2 diabetes, low-grade inflammation and liver diseases. The gut microbiota is a potential contributing factor regulating energy balance. However, although the scientific community acknowledges that the gut microbiota composition and its activity (e.g., production of metabolites and immune-related compounds) are different between healthy subjects and subjects with overweight/obesity, the causality remains insufficiently demonstrated. The development of low-grade inflammation and related metabolic disorders has been connected with metabolic endotoxaemia and increased gut permeability. However, the mechanisms acting on the regulation of the gut barrier and eventually cardiometabolic disorders are not fully elucidated. In this review, we debate several characteristics of the gut microbiota, gut barrier function and metabolic outcomes. We examine the role of specific dietary compounds or nutrients (e.g., prebiotics, probiotics, polyphenols, sweeteners, and a fructose-rich diet) as well as different metabolites produced by the microbiota in host metabolism, and we discuss how they control several endocrine functions and eventually have either beneficial or deleterious effects on host health.