The community of microbes residing in the intestine (gut microbiota) impact and is influenced by host physiology. Additionally, diet has been implicated as a modulator of host-microbiota interactions. However, the impact of prolonged dietary changes, especially in concert with host development, on host-microbiota interactions is largely unexplored. Also unknown is the degree to which gut and environmental microbiota may interact. Improved understanding of how these ecological relationships change over time may lead to more targeted or efficacious means of treating microbiota-associated pathologies such as obesity, malnutrition, and inflammatory bowel diseases. Here, we use 16S ribosomal DNA sequencing to characterize gut microbiota of fish fed different diets through the host life cycle. To determine the impact of long-term environmental differences, we first compared gut microbiota of rainbow trout fed either fishmeal of grain-based meal feeds combined with different rearing densities over 10 months. Our results show that rainbow trout gut microbiota, which possess a large set of shared bacteria (core microbiota), are resistant to the tested diet and rearing density differences. In zebrafish, we assessed the impact of life-long differences in dietary fat levels on gut microbiota at multiple developmental stages. We observed age-dependent impacts of different dietary fat levels on gut microbiota composition as well as on the degree to which selection and neutral processes impacted microbiota assembly. This suggests that host development is an important determinant of the impact of diet on gut microbiota. Finally, we characterized gut microbiota in zebrafish over the course of three weeks of starvation followed by three weeks of re-feeding. We observed that gut microbiota of starved fish became increasing different from that of fed fish and that gut microbiota of starved fish were unable to fully recover from starvation within three weeks of refeeding despite restoration of normal growth. Together, these suggest that different long-term environmental differences have different potentials to impact gut microbiota. Future work might characterize whether and how prolonged nutritional differences during discrete developmental windows impact gut microbiota and host physiology later in life.