There is substantial variability in patient outcomes for gastrointestinal bleeding (GIB) across hospitals. This study aimed to identify hospital factors associated with GIB outcomes. This was a retrospective cohort study of Medicare fee-for-service beneficiaries hospitalized for GIB from 2016 to 2018. These data were merged with the American Hospital Association Annual Survey data to incorporate hospital characteristics. We used generalized linear mixed-effect models to estimate the effect of hospital-level characteristics on patient outcomes after adjusting for patient risk factors including anticoagulant and antiplatelet use, recent GIB, and comorbidities. The primary outcome was 30-day mortality, and secondary outcomes included length of stay and a composite outcome of 30-day readmission or mortality. Factors associated with improved GIB 30-day mortality included large hospital size (defined as beds >400, odds ratio [OR] 0.93, 95% confidence interval [CI] 0.90-0.97), greater case volume (OR 0.97, 95% CI 0.96-0.98), increased resident and nurse staffing (OR 0.88, 95% CI 0.83-0.94), and blood donor center designation (OR 0.93, 95% CI 0.88-0.99). Patients treated at a hospital with multiple advanced capabilities, such as availability of advanced endoscopy, advanced intensive care unit (ICU) capabilities (both a medical-surgical ICU and cardiac ICU), blood donor center, and liver transplant center, had a 22% reduction in 30-day mortality risk, compared with those hospitalized in a hospital with none of these services (OR 0.78, 95% CI 0.68-0.91). However, length of stay increased with additional services. Patients hospitalized for GIB at hospitals with multiple advanced specialized capabilities have lower mortality but longer lengths of stay. Further research should examine the processes of care linked to these services that contribute to improved mortality in GIB.