Gut microbiota that composed of microorganisms and defined as a complex ecosystem, functions as an organ is affected by several factors including mode of delivery, breastfeeding, antibiotics use, and host environment. Gut microbiota plays a substantial role in food digestion and regulates intestinal structure and functions. There is a strong interaction between food intake and gut microbiota. Recent studies have shown an association between gut microbiota and obesity. Different metabolic pathways underlying effects of microbiota alterations on the incidence of obesity have been suggested. Some of these include the production of short-chain fatty acids through increased dietary polysaccharide levels, gene regulation increasing adipose tissue storage, and inflammation. Studies of the association between obesity and microbiota have indicated that the Firmicutes/Bacteroidetes ratio is higher in obese individuals than in individuals with normal weight. Moreover, as the genetic diversity of gut microbiota decreases, adiposity, insulin resistance, and inflammation increase. Lifestyle (diet and physical activity) changes are among the important approaches to treat obesity; however, bariatric surgery can be performed in individuals with a body mass index of >40 kg/m(2) and/or those with comorbidities. Weight loss after bariatric surgery can increase gut microbial diversity. Soon after bariatric surgery (before weight loss), improvements in biomarkers related to type 2 diabetes have been observed. These findings indicate the presence of mechanisms underlying the success of bariatric surgery beyond weight loss. After bariatric surgery, decrease in Firmicutes and increase in Bacteroidetes in the gut have been reported.