I'll show how the dispersion relation for surface water waves can be derived.

The words about "resonance" in the body of the question are true in the broad sense that *any* wave can be regarded as a kind of resonance, loosely speaking. The question in the title is more specific, so I'll focus on that. A wave is called **dispersive** if its speed depends on its wavelength $\lambda$. In terms of the angular frequency $\omega=2\pi f$ and wavenumber $k=2\pi/\lambda$, this condition means that $\omega$ is *not* proportional to $k$. The goal is to understand why surface water waves have this property.

<h2> Inputs </h2>

Let $\mathbf{x}=(x,y,z)$ be a point in space, either on or below the surface of the water, and let $\mathbf{v}(\mathbf{x})$ be the velocity of the water at that point. Take $z$ to be the vertical direction, and let $h(x,y,t)$ be the height of the water's surface relative to what it would be with no waves. The wave is governed by two forces:

- Gravity, which tries to keep the surface *low*. 

- Surface tension, which tries to keep the surface *flat*.

According to refs 1 and 2, the force of gravity is the dominant one for long wavelengths $\lambda\gg 2\text{ cm}$ (called **gravity waves**), and the surface tension dominates for short wavelengths $\lambda\ll 2\text{ cm}$ (called **capillary waves**). Both limits exhibit dispersion. I'll keep the wavelength $\lambda$ arbitrary, but I'll use these approximations:

- The water is incompressible: $\nabla\cdot\mathbf{v}=0$. The density $\rho$ is constant and uniform.

- The water is irrotational: $\nabla\times\mathbf{v}=0$.

- The bottom of the body of water is flat (no underwater mountains).

- The changes in height $h$ (the amplitude of the wave) are small enough to justify using the linear approximation. This approximation allows us to ignore the difference between the time-derivative of $\mathbf{v}$ at a fixed point in space and the "material" time-derivative of $\mathbf{v}$ at a point that moves along with the flow.

<h2> Analysis </h2>

The irrotational condition implies that we can write $\mathbf{v}$ as the gradient of a scalar function $\phi$:
$$
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfx}{\mathbf{x}}
	\bfv=\nabla\phi.
$$
Then the incompressibility condition implies
$$
	\nabla^2\phi=0.
\tag{I}
$$
At the surface, the $z$-component of $\bfv$ must match the time-derivative of the height-function $h$:
$$
	\nabla_z\phi=\frac{dh}{dt}
\hspace{2cm}
	\text{at }z=h.
\tag{H}
$$
At the bottom of the body of water, the $z$-component of $\bfv$ must be zero:
$$
	\nabla_z\phi=0
\hspace{2cm}
	\text{at }z=-D,
\tag{D}
$$
where $D$ stands for "depth." At any point under the surface, the water's acceleration is determined by the forces of gravity and pressure:
$$
	\frac{d\bfv}{dt}+g\nabla z+\frac{\nabla P}{\rho}=0,
$$
where $g$ is the acceleration of gravity, $P$ is the pressure, and $\rho$ is the density (which we're assuming is constant and uniform &mdash; the incompressibility condition). Note that $\nabla z$ is just a convenient way of writing the vertical unit vector. Write this equation in terms of $\phi$ to get
$$
	\nabla\left(\frac{d\phi}{dt}+g z+\frac{P}{\rho}\right)=0,
$$
which implies
$$
	\frac{d\phi}{dt}+g z+\frac{P-P_0}{\rho}=0
$$
where $P_0$ is an integration constant that we can interpret as the pressure at the surface. The jump in pressure at the surface is determined by the surface tension:
$$
	P-P_0 = -T \nabla^2 h
$$
where $\nabla^2 h$ measures the curvature of the surface and $T$ is a constant relating the tension to the degree of curvature. (Surface tension tries to make the surface *flat*, so more curvature means more tension.) Use that in the preceding equation to get
$$
	\frac{d\phi}{dt}+g h-\frac{T}{\rho}\nabla^2 h=0
\hspace{2cm}
	\text{at }z=h.
\tag{1}
$$
To express this entirely in terms of $\phi$, take the time-derivative of (1) and use (H) to get
$$
	\frac{d^2\phi}{dt^2}+g \nabla_z \phi-\frac{T}{\rho}\nabla^2 \nabla_z \phi =0
\hspace{2cm}
	\text{at }z=h.
\tag{2}
$$
Now consider a wave moving in the $x$-direction:
$$
	\phi(\bfx)=f(z)\sin(\omega t-kx),
\tag{A}
$$
where $f$ is a function to be determined. Use this ansatz in (2) to get
$$
	-\omega^2 f+g f'+ \frac{T}{\rho}k^2 f' = O(f''')
\hspace{2cm}
	\text{at }z=h,
\tag{3}
$$
where $f'(z)=df/dz$. We can neglect the $f'''$ term in the small-amplitude approximation, because $f(h)=f(0)+hf'(0)+(h^2/2)f''(0)+\cdots$. Use the ansatz (A) in the incompressibility condition (I) to get
$$
	f''-k^2f =0,
$$
and combine this with the bottom boundary condition (D) to infer
$$
	f(z)\propto \cosh(kz+kD)
	\approx\cosh(kD),
$$
using the small-amplitude approximation again. Use this in (3) to get the final result
$$
	\omega^2 = \left(gk+\frac{T}{\rho}k^3\right)\tanh(kD).
\tag{R}
$$
This is the **dispersion relation**. It shows that $\omega$ is generally *not* proportional to $k$, so surface water waves are generally dispersive: their speed depends on their wavelength. The speed (phase velocity) is $\omega/k$, so equation (R) shows that in the deep-water approximation ($\tanh(kD)\approx 1$), longer wavelengths travel faster when gravity is the dominant restoring force (gravity waves), and shorter wavelengths travel faster when surface tension is the dominant restoring force (capillary waves).

---

References:

1. Kartashova (2009), "Nonlinear resonances of water waves," *Discrete and Continuous Dynamical Systems Series B* **12**:607-621 (https://www3.risc.jku.at/publications/download/risc_3822/resonances_6.pdf)

2. Mei (2004), "Chapter four: waves in water," notes for an MIT course in wave propagation (http://web.mit.edu/1.138j/www/material/chap-4.pdf)