Context: Herschel observations suggest that the H$_2$O distribution in outflows from low-mass stars resembles the H$_2$ emission. It is still unclear which of the different excitation components that characterise the mid- and near-IR H$_2$ distribution is associated with H$_2$O. Aim: The aim is to spectrally resolve the different excitation components observed in the H$_2$ emission. This will allow us to identify the H$_2$ counterpart associated with H$_2$O and finally derive directly an H$_2$O abundance estimate with respect to H$_2$. Methods: We present new high spectral resolution observations of H$_2$ 0-0 S(4), 0-0 S(9), and 1-0 S(1) towards HH 54, a bright nearby shock region in the southern sky. In addition, new Herschel-HIFI H$_2$O (2$_{12}$$-$1$_{01}$) observations at 1670~GHz are presented. Results: Our observations show for the first time a clear separation in velocity of the different H$_2$ lines: the 0-0 S(4) line at the lowest excitation peaks at $-$7~km~s$^{-1}$, while the more excited 0-0 S(9) and 1-0 S(1) lines peak at $-$15~km~s$^{-1}$. H$_2$O and high-$J$ CO appear to be associated with the H$_2$ 0-0 S(4) emission, which traces a gas component with a temperature of 700$-$1000 K. The H$_2$O abundance with respect to H$_2$ 0-0 S(4) is estimated to be $X$(H$_2$O)$<$1.4$times$10$^{-5}$ in the shocked gas over an area of 13$^{primeprime}$. Conclusions: We resolve two distinct gas components associated with the HH 54 shock region at different velocities and excitations. This allows us to constrain the temperature of the H$_2$O emitting gas ($leq$1000 K) and to derive correct estimates of H$_2$O abundance in the shocked gas, which is lower than what is expected from shock model predictions.