We study the dynamics of epidemic and reaction-diffusion processes in metapopulation models with heterogeneous connectivity patterns. In susceptible-infected-removed-like processes, along with the standard local epidemic threshold, the system exhibits a global invasion threshold. We provide an explicit expression of the threshold that sets a critical value of the diffusion/mobility rate below, which the epidemic is not able to spread to a macroscopic fraction of subpopulations. The invasion threshold is found to be affected by the topological fluctuations of the metapopulation network. The results presented provide a general framework for the understanding of the effect of travel restrictions in epidemic containment.