The acquisition and maturation of the gastrointestinal microbiome is a crucial aspect of mammalian development, particularly for specialist herbivores such as the koala (Phascolarctos cinereus). Joey koalas are thought to be inoculated with microorganisms by feeding on specialized maternal faeces (pap). We found that compared to faeces, pap has higher microbial density, higher microbial evenness and a higher proportion of rare taxa, which may facilitate the establishment of those taxa in joey koalas. We show that the microbiomes of captive joey koalas were on average more similar to those of their mothers than to other koalas, indicating strong maternal inheritance of the faecal microbiome, which can lead to intergenerational gut dysbiosis when the mother is ill. Directly after pap feeding, the joey koalas' microbiomes were enriched for milk-associated bacteria including Bacteroides fragilis, suggesting a conserved role for this species across mammalian taxa. The joeys' microbiomes then changed slowly over 5 months to resemble those of adults by 1 year of age. The relative abundance of fibrolytic bacteria and genes involved in the degradation of plant cell walls also increased in the infants over this time, likely in response to an increased proportion of Eucalyptus leaves in their diets.