We analyze diffusion in a finite domain with a position-dependent diffusion coefficient in terms of a stochastic hopping process. Via a coordinate transformation, we map the original system onto a problem with constant diffusion but nontrivial potential. In this way we show that a regime with enhanced diffusion acts as a potential barrier. We compute first-passage time distributions, hopping rates, and eigenvalues of the Fokker-Planck operator, and thereby verify that diffusion with a heat barrier is equivalent to a hopping process between metastable states.