The first years of life are paramount in establishing our endogenous gut microbiota, which is strongly affected by diet and has repeatedly been linked with obesity. However, very few studies have addressed the influence of maternal obesity on infant gut microbiota, which may occur either through vertically transmitted microbes or through the dietary habits of the family. Additionally, very little is known about the effect of diet during the complementary feeding period, which is potentially important for gut microbiota development. Here, the gut microbiotas of two different cohorts of infants, born either of a random sample of healthy mothers (n = 114), or of obese mothers (n = 113), were profiled by 16S rRNA amplicon sequencing. Gut microbiota data were compared to breastfeeding patterns and detailed individual dietary recordings to assess effects of the complementary diet. We found that maternal obesity did not influence microbial diversity or specific taxon abundances during the complementary feeding period. Across cohorts, breastfeeding duration and composition of the complementary diet were found to be the major determinants of gut microbiota development. In both cohorts, gut microbial composition and alpha diversity were thus strongly affected by introduction of family foods with high protein and fiber contents. Specifically, intake of meats, cheeses, and Danish rye bread, rich in protein and fiber, were associated with increased alpha diversity. Our results reveal that the transition from early infant feeding to family foods is a major determinant for gut microbiota development.