Neutral hydrogen (HI) intensity mapping traces the large-scale distribution of matter in the Universe and therefore should correlate with the gamma-ray emission originated from particle dark matter annihilation or from active galactic nuclei and star-forming galaxies, since the related processes occur in the same cosmic structures hosting HI. In this paper, we derive the cross-correlation signal between the brightness temperature of the 21-cm line emission of the HI spin-flip transition in the Universe and the unresolved gamma-ray background. Specifically, we derive forecasts for the cross-correlation signal by focussing on the opportunities offered by the combination of the Fermi-Large Area Telescope (LAT) gamma-ray sensitivity with the expectations of the HI intensity mapping measurements from future radio telescopes, for which we concentrate on the Square Kilometre Array (SKA) and MeerKAT, one of its precursors. We find that the combination of MeerKAT with the current Fermi-LAT statistics has the potential to provide a first hint of the cross-correlation signal originated by astrophysical sources, with a signal-to-noise ratio (SNR) of 3.7. With SKA Phase 1 and SKA Phase 2, the SNR is predicted to increase up to 5.7 and 8.2, respectively. The bounds on dark matter properties attainable with SKA combined with the current statistics of Fermi-LAT are predicted to be comparable to those obtained from other techniques able to explore the unresolved components of the gamma-ray background. The enhanced capabilities of SKA Phase 2, combined with a future generation gamma-ray telescope with improved specifications, can allow us to investigate the whole mass window for weakly interacting massive particles up to the TeV scale.