Gut microbiota data obtained by DNA sequencing are not only complex because of the number of taxa that may be detected within human cohorts, but also compositional because characteristics of the microbiota are described in relative terms (e.g., “relative abundance” of particular bacterial taxa expressed as a proportion of the total abundance of taxa). Nutrition researchers often use standard principal component analysis (PCA) to derive dietary patterns from complex food data, enabling each participant's diet to be described in terms of the extent to which it fits their cohort's dietary patterns. However, compositional PCA methods are not commonly used to describe patterns of microbiota in the way that dietary patterns are used to describe diets. This approach would be useful for identifying microbiota patterns that are associated with diet and body composition. The aim of this study is to use compositional PCA to describe gut microbiota profiles in 5 year old children and explore associations between microbiota profiles, diet, body mass index (BMI) z-score, and fat mass index (FMI) z-score. This study uses a cross-sectional data for 319 children who provided a faecal sample at 5 year of age. Their primary caregiver completed a 123-item quantitative food frequency questionnaire validated for foods of relevance to the gut microbiota. Body composition was determined using dual-energy x-ray absorptiometry, and BMI and FMI z-scores calculated. Compositional PCA identified and described gut microbiota profiles at the genus level, and profiles were examined in relation to diet and body size. Three gut microbiota profiles were found. Profile 1 (positive loadings on Blautia and Bifidobacterium; negative loadings on Bacteroides) was not related to diet or body size. Profile 2 (positive loadings on Bacteroides; negative loadings on uncultured Christensenellaceae and Ruminococcaceae) was associated with a lower BMI z-score (r = -0.16, P = 0.003). Profile 3 (positive loadings on Faecalibacterium, Eubacterium and Roseburia) was associated with higher intakes of fibre (r = 0.15, P = 0.007); total (r = 0.15, P = 0.009), and insoluble (r = 0.13, P = 0.021) non-starch polysaccharides; protein (r = 0.12, P = 0.036); meat (r = 0.15, P = 0.010); and nuts, seeds and legumes (r = 0.11, P = 0.047). Further regression analyses found that profile 2 and profile 3 were independently associated with BMI z-score and diet respectively. We encourage fellow researchers to use compositional PCA as a method for identifying further links between the gut, diet and obesity, and for developing the next generation of research in which the impact on body composition of dietary interventions that modify the gut microbiota is determined.