  We investigate the possibility of testing Einstein's general theory of
relativity (GR) and the standard cosmological model via the $E_{\rm G}$
statistic using neutral hydrogen (HI) intensity mapping. We generalise the
Fourier space estimator for $E_{\rm G}$ to include HI as a biased tracer of
matter and forecast statistical errors using HI clustering and lensing surveys
that can be performed in the near future, in combination with ongoing and
forthcoming optical galaxy and Cosmic Microwave Background (CMB) surveys. We
find that fractional errors $< 1\%$ in the $E_{\rm G}$ measurement can be
achieved in a number of cases and compare the ability of various survey
combinations to differentiate between GR and specific modified gravity models.
Measuring $E_{\rm G}$ with intensity mapping and the Square Kilometre Array can
provide exquisite tests of gravity at cosmological scales.
