Chronic kidney disease (CKD) increases the risk of cardiovascular disease (CVD) and is more prevalent in older adults. Retinal age gap, a biomarker of aging based on fundus images, has been previously developed and validated. This study aimed to investigate the association of retinal age gap with CKD and subsequent CVD complications. A deep learning model was trained to predict the retinal age using 19200 fundus images of 11052 participants without any medical history at baseline. Retinal age gap, calculated as retinal age predicted minus chronological age, was calculated for the remaining 35906 participants. Logistic regression models and Cox proportional hazards regression models were used for the association analysis. A total of 35906 participants (56.75±8.04 years, 55.68% female) were included in this study. In the cross-sectional analysis, each 1-year increase in retinal age gap was associated with a 2% increase in the risk of CKD prevalence [odds ratio 1.02, 95% confidence interval (CI) 1.01-1.04, P=.012]. A longitudinal analysis of 35039 participants demonstrated that 2.87% of them developed CKD in follow-up, and each 1-year increase in retinal age gap was associated with a 3% increase in the risk of CKD incidence (hazard ratio 1.03, 95% CI 1.01-1.05, P=.004). In addition, a total of 111 CKD patients (15.81%) developed CVD in follow-up, and each 1-year increase in retinal age gap was associated with a 10% increase in the risk of incident CVD (hazard ratio 1.10, 95% CI 1.03-1.17, P=.005). We found that retinal age gap was independently associated with the prevalence and incidence of CKD, and also associated with CVD complications in CKD patients. This supports the use of this novel biomarker in identifying individuals at high risk of CKD and CKD patients with increased risk of CVD.