It is frequently stated the Higgs mechanism involves spontaneous breaking of the gauge symmetry. This is, however, entirely wrong. In fact, gauge symmetries cannot be spontaneously broken.
A standard argument for this is that gauge symmetries are not actual symmetries, they are just a
reflection of a redundancy in our description the system; two states related by
a gauge transformation are actually the same physical state. Thus, a gauge
symmetry is physically a "do-nothing transformation" and thus it does not make
sense for it to be
spontaneously broken.
This argument does seem like a bit of a cop-out, though -- I could just declare
any symmetry to be a ``do-nothing transformation'' by fiat if I wanted to.
A more satisfying explanation is: even if we interpret
gauge symmetries as real symmetries, they can never be spontaneously broken.
This result is known as Elitzur's theorem, and it's quite easy to
understand why it should be true. Let's focus on classical thermal systems
-- quantum systems at zero temperature map onto classical thermal systems in
one higher space dimension so the argument should carry over.
First recall the
hand-waving argument for why spontaneous symmetry breaking can take place in,
say, the 2-D Ising model at finite temperature. The 2-D Ising model has two symmetry-breaking ground states: all
$\uparrow$ and all $\downarrow$. But, if I want to get between them by local
thermal fluctuations then I have to create a domain and grow it until it
encompasses the whole system, which implies an extensive energy penalty due to
the energy cost of the domain wall. Thus, at low temperatures transitions
between the two ground states are exponentially suppressed in the system size
and so the system gets stuck in either all $\uparrow$ or all $\downarrow$, so
the symmetry is spontaneously broken. (The same argument shows why the
1-D Ising model cannot have spontaneous symmetry breaking at finite
temperature, because there is no extensive energy penalty to get from all
$\uparrow$ to all $\downarrow$.)
On the other hand, since a gauge symmetry is a local symmetry, this
argument breaks down. Any two symmetry-breaking ground states are related by a
sequence of local gauge transformations, which (since they commute with the
Hamiltonian) have exactly zero energy penalty. Thus, there is no energy barrier
between different ground states, and the system will explore the entire space of
ground states -- so no symmetry-breaking. We expressed everything here in terms
of classical thermal systems, but it will be important for later that the quantum version of no
symmetry breaking is that the Hamiltonian must have a unique ground state
(at least with appropriate boundary conditions), because degenerate ground
states can always couple to each other through quantum fluctuations to create a
superposition state with lower energy.
So now that we have established that the Higgs mechanism does not, and cannot,
correspond to spontaneous symmetry breaking, let's take a look at what's really
happening. For simplicity we will look at the simplest case, namely (quantum, $T = 0$)
$\mathbb{Z}_2$ lattice gauge theory. This comprises two-dimensional quantum systems on
all the vertices and links of a square lattice. The ones on the vertices
comprise the "matter field" and the ones on the links comprise the "gauge
field". We denote the Pauli matrices on the links by $\sigma_{ab}^x$, etc. and on
the vertices by $\tau_{a}^x$, etc.
The Hamiltonian is
$$
H = -g \sum_{\langle a, b\rangle} \sigma^x_{ab} - \frac{1}{g} \sum_{\square}
\sigma^z \sigma^z \sigma^z \sigma^z - \lambda \sum_{a} \tau^x_a -
\frac{1}{\lambda} \sum_{\langle a, b \rangle} \tau_a^z \sigma^z_{ab} \tau_b^z
$$
[the second-term is a sum of four-body $\sigma^z$ interactions on squares of the lattice ("plaquettes"), and $\langle a, b \rangle$ means a sum over nearest neighbor pairs of vertices.]
This Hamiltonian has a gauge symmetry $\tau^x_a \prod_{\langle a, b \rangle}
\sigma^x_b$ for each vertex $a$.
One can map out the phase diagram of this Hamiltonian in detail, but here we
will just want to focus on the "Higgs" phase, which occurs when $g$ and
$\lambda$ are small so that the second and fourth terms dominate. We will take
the limit $g \to 0$, claiming without proof that the $g$ small but not
zero case is qualitatively similar. In this limit the ground state must be a
$+1$ eigenstate of the product of $\sigma^z$
around every plaquette ("no-flux" condition). If the model is defined on a space with no
non-contractible loops, this implies that we can write, for every ``no-flux''
configuration, $\sigma^z_{ab} = \widetilde{\sigma}^z_a \widetilde{\sigma}^z_b$
for some choice of $\{ \widetilde{\sigma}^z_a \} = \pm 1$.
Hence, all "no-flux" configurations can be made to satisfy $\sigma^z_{ab} = 1$
by an appropriate gauge transformation. Thus, under this gauge-fixing condition, the Hamiltonian reduces to the
transverse-field quantum Ising model on the matter fields:
\begin{equation}
H_{gf} = -\lambda \sum_{a} \tau^x_a - \frac{1}{\lambda} \sum_{\langle a,b \rangle} \tau_a^z \tau_b^z
\end{equation}
which we know will have a symmetry-breaking phase (i.e. a two-fold degenerate
ground state) for small $\lambda$. This is
the Higgs phase.
Q: But hang on, now, doesn't Elitzur's theorem say that gauge symmetries can't be
spontaneously broken?
A: Well, actually in fixing the gauge we used up the local
part of the gauge symmetry, and the above Hamiltonian $H_{gf}$ only has a
$\mathbb{Z}_2$ global symmetry. Thus, it does not violate
Elitzur's theorem for it to have spontaneous symmetry breaking.
Q: But what about the original Hamiltonian, $H$? It had a
gauge symmetry, and it's equivalent to the new Hamiltonian $H_{gf}$, which has
spontaneous symmetry-breaking, so the original Hamiltonian must have
spontaneous symmetry-breaking too?
A: You have to be very careful about the sense in which $H$ and $H_{gf}$ are
equivalent, because the "gauge-fixing" transformation which relates them
isn't unitary (since it's many-to-one). Still, if one thinks hard enough and
uses the fact that $H$ is invariant under the gauge symmetry, it
is not hard to show that there is a correspondence between eigenstates of $H$
and of $H_{gf}$. However, because the two degenerate ground states of $H_{gf}$ are
related by a gauge transformation, they actually correspond only to a single
unique ground state of $H$, in accordance with Elitzur's theorem. This unique
ground state $|\Psi\rangle_H$ of $H$ can be found in terms of the ground states $|\Psi\rangle_{H_{gf}}$ of $H_{gf}$ by
symmetrizing them to make them gauge-invariant, i.e.
\begin{equation}
|\Psi\rangle_H = \sum_{\mathcal{G}} \mathcal{G} |\Psi\rangle_{H_{gf}},
\end{equation}
where the sum is over all possible gauge transformations $\mathcal{G}$ (since
the two degenerate ground states are related by a gauge transformation, this
gives the same $|\Psi\rangle_H$ regardless of which one you choose to be
$|\Psi\rangle_{H_{gf}}$.)
So in summary, the Higgs mechanism appears to resemble spontaneous symmetry breaking in a particular choice of gauge, but this is an illusion. The true ground state is unique and gauge-invariant.