Gastric cancer (GC) survivors may be more likely to develop osteoporosis. However, few studies on the relationship between GC and osteoporosis have been conducted on large patient populations. We aimed to determine the incidence of osteoporosis and identify related factors by comparing patients with GC and matched controls using the Korean National Health Insurance Service—National Sample Cohort (KNHIS-NSC). This study included 9078 patients with GC and 36,312 controls (1:4 propensity score-matched for sex, age, residence, and income). The hazard ratio (HR) for osteoporosis was significantly greater for GC patients than for controls according to Charlson Comorbidity Index (CCI) score-adjusted models (adjusted HR = 1.13). Kaplan–Meier analysis revealed that the cumulative incidence of osteoporosis during the follow-up period commencing from the index date was significantly greater in GC patients than in the controls (p = 0.0087). A positive correlation of osteoporosis with GC was detected for those aged < 65 years, males, and those with CCI scores = 0. In conclusion, the study findings suggest that men with GC aged < 65 years may be at an increased risk for osteoporosis. Research into additional risk factors and the optimal timing of interventions are needed to prevent fractures and minimize bone loss in GC survivors.