We investigate the phase transformation of HfO2 under hydrostatic pressure through first-principles pseudopotential calculations within the local-density-functional approximation (LDA) and the generalized gradient approximation (GGA). We find that with increasing of pressure, HfO2 undergoes a series of structural transformations from monoclinic to orthorhombic I and then to orthorhombic II, consistent with experiments. The calculated transition pressures within the GGA are in good agreement with the measured values, while they are severely underestimated by the LDA. Analyzing the distribution of electron densities for the high-pressure phases, we find that the electron densities of the orthorhombic-II phase are more homogeneous than for the orthorhombic-I phase. Due to this distinct difference in the homogeneity of electron densities, the energy difference between the orthorhombic-I and orthorhombic-II phases is enhanced in the GGA; thus, the transition pressure between the two phases increases significantly.