The gut microbiota interacts with the host gut environment, which is influenced by such factors as sex, age, and host diet. These factors induce changes in the microbial composition. The aim of this study was to identify differences in the gut microbiome of Fisher-344 (F344) rats fed a high-fat diet (HFD), depending on their age and sex. Fecal microbiomes from 6-, 31-, and 74-week-old, and 2-year-old both male and female rats (corresponding to 5-, 30-, 60-, and 80-year-old humans) were analyzed using 16S rRNA gene sequencing, phylogenetic investigation of communities by reconstruction of unobserved states, and enterotype (E) assessment. Moreover, the effect of an HFD on colonic epithelial cells was measured using real-time quantitative PCR. Alpha diversity decreased in the HFD group regardless of age and sex. Based on the enterotype clustering of the whole fecal microbiome, clusters from male rats were divided into E1 and E2 enterotypes, while clusters from female rats were divided into E1, E2, and E3 enterotypes. The female E3 group showed a significantly high abundance in the Ruminococcus genus and expression of Tlr2 mRNA, which may reflect compensation to the HFD. Moreover, the female E3 group showed a lower ratio of opportunistic pathogenic strains to commensal strains compared to the female E2 group. Administration of an HFD influenced the rat fecal microbiota in all assessed age groups, which could be further differentiated by sex. In particular, female rats showed a compensatory enterotype response to an HFD compared to male rats.