Loss of gut integrity is linked to various human diseases including inflammatory bowel disease. However, the mechanisms that lead to loss of barrier function remain poorly understood. Using D. melanogaster, we demonstrate that dietary restriction (DR) slows the age-related decline in intestinal integrity by enhancing enterocyte cellular fitness through up-regulation of dMyc in the intestinal epithelium. Reduction of dMyc in enterocytes induced cell death, which leads to increased gut permeability and reduced lifespan upon DR. Genetic mosaic and epistasis analyses suggest that cell competition, whereby neighboring cells eliminate unfit cells by apoptosis, mediates cell death in enterocytes with reduced levels of dMyc. We observed that enterocyte apoptosis was necessary for the increased gut permeability and shortened lifespan upon loss of dMyc. Furthermore, moderate activation of dMyc in the post-mitotic enteroblasts and enterocytes was sufficient to extend health-span on rich nutrient diets. We propose that dMyc acts as a barometer of enterocyte cell fitness impacting intestinal barrier function in response to changes in diet and age.