I'll build on tparker's answer in a way that emphasizes the great generality of the relationship between momentum and wavelength.
In classical physics, a very general result called Noether's theorem can be used as the foundation for a definition of momentum. The inputs to Noether's theorem are:
- the action principle — loosely translated, this says that if one physical entity influences another, then they must both influence each other;
- any continuous symmetry — such as rotational symmetry or time-translation symmetry.
Noether's theorem says that these inputs imply the existence of a conservation law associated with the given symmetry. For example, rotational symmetry leads to the conservation of angular momentum, and time-translation symmetry leads to the conservation of energy. These connections may be regarded as the definitions of angular momentum and of energy, respectively.
If the symmetry is symmetry under translations in space, meaning roughly that the laws of physics are the same in all places, then the resulting conservation law is the conservation of momentum — that is, the total momentum of the system. This connection may be regarded as the definition of momentum.
In a model that includes the electromagnetic field, this definition of momentum includes a contribution from the electromagnetic field — and from anything else that participates in the action principle by influencing (and being influenced by) other entities.
In quantum physics, these same general connections come with another twist: for each of these symmetries, we have an operator that generates those symmetries (more detail given below), and this operator is quantum theory's representation of the corresponding conserved quantity. In particular, the momentum operator generates translations in space. More precisely, this is the total momentum operator, which generates translations of the whole physical system in space. This operator is a basic ingredient in any quantum system whose laws are the same in all places. This is true in both non-relativistic quantum mechanics and in relativistic quantum field theory. Although the concept of a massless particle does involve relativity, the connection between momentum and space-translation symmetry does not rely on relativity.
Now, as promised, here's more detail about what it means to say that the momentum operator "generates translations in space." As in tparker's answer, let $\hat P$ denote any single component of the momentum operator, which generates translations in that one direction in space. The answer by tparker already illustrated this nicely in the case of single-particle quantum mechanics. For another example, I'll consider how a massless photon is described in the quantum model of the electromagnetic field. In this model, instead of having an operator $\hat X$ for the position of a single particle, we have field-operators like $\hat E(x)$ and $\hat B(x)$ representing the electric and magnetic fields. These operators parameterized by the location $x$ in space. I'm omitting their vector indices to avoid cluttering the equations.
Now, a photon is a particle that, mathematically, is created by applying an appropriate linear combination of $\hat E(x)$ and $\hat B(x)$ to the vacuum state. Such a single-photon state may be written in the form
$$
|1\rangle = \int dx\ \big(f(x)\hat E(x) + g(x) \hat B(x)\big)|0\rangle
$$
where $|0\rangle$ is the vacuum state and where $f$ and $g$ are appropriate complex-valued functions of the spatial coordinate $x$. Given any such single-photon state, we can translate the photon in space by an amount $a$ by applying the operator $\exp(i\hat P a/\hbar)$, like this:
\begin{align*}
\exp\big(i\hat P a/\hbar\big)|1\rangle
&=
\int dx\ \big(f(x)\hat E(x+a) + g(x) \hat B(x+a)\big)|0\rangle
\\
&=
\int dx\ \big(f(x-a)\hat E(x) + g(x-a) \hat B(x)\big)|0\rangle.
\end{align*}
The second step follows simply by changing the integration variable.
The first step follows from
\begin{align*}
\exp\big(i\hat P a/\hbar\big)\hat E(x)
&= \hat E(x+a)\exp\big(i\hat P a/\hbar\big)
\\
\exp\big(i\hat P a/\hbar\big)\hat B(x)
&= \hat B(x+a)\exp\big(i\hat P a/\hbar\big)
\end{align*}
which is what it means to say that $\hat P$ generates translations, together with
$$
\hat P\,|0\rangle = 0
\hskip1cm
\Rightarrow
\hskip1cm
\exp\big(i\hat P a/\hbar\big)\,|0\rangle = |0\rangle,
$$
which says that the vacuum state is invariant under translations.
Since $\hat P$ is also the momentum operator by definition (as in the Noether's-theorem perspective described above), saying that a photon has a single momentum $p$ is equivalent to saying that the state $|1\rangle$ satisfies
$$
\hat P\,|1\rangle = p\,|1\rangle.
$$
(By the way, the other equation $\hat P\,|0\rangle=0$ shown above says that the vacuum state has zero momentum.)
This implies
$$
\exp\big(i\hat P a/\hbar\big)\,|1\rangle
= \exp\big(i p a/\hbar\big)\,|1\rangle.
$$
By itself, this is inconclusive, because in a single-photon state, there is nothing else for the photon to interact with that could reveal its wavelength. However, the same principles still apply when we consider a photon in the context of some kind of interferometer, and then the fact that the photon's phase oscillates like $ \exp(i p a/\hbar)$ has observable consequences. In particular, translating the photon through a distance $a$ such that $pa/\hbar = 2\pi$ is the same as multiplying its state by $\exp(2\pi i)=1$. In other words, its wavelength is
$$
\lambda=2\pi\frac{\hbar}{p} = \frac{h}{p}.
$$
Although the idea of a massless photon does rely on relativity, the idea that the momentum and wavelength of a particle are related in this way does not. This relationship follows from the very general fact that the momentum operator generates translations in space — illustrated here using a model of the elecromagnetic field, and illustrated by tparker using single-particle quantum mechanics.