As emphasized in the answer by Cosmas Zachos, the key is to distinguish between the full Higgs field, which has two complex components, and the part corresponding to the Higgs particle. (I'm using the word "particle" a bit loosely here. "Resonance" might be a better name.)
Here's another way of thinking about that distinction. Intuitively, if the gauge fields were absent, we would have two different types of excitation associated with the two-component Higgs field:
The first type would be the Goldstone modes corresponding to oscillations of the Higgs field along the "flat" directions of the Higgs potential $V(\phi)$ — that is, along the "valley" in the graph of $V$ versus $\phi$. These modes are massless because those oscillations don't cost any energy: $V(\phi)$ depends only on the magnitude of $\phi$, not on where we are in the "valley."
The second type corresponds to oscillations in the "radial" direction, transverse to the "valley" so that the magnitude of the Higgs field is oscillating (about a non-zero vacuum expectation value). This mode is massive, because these oscillations do cost energy: $V(\phi)$ depends on the magnitude of $\phi$.
When the gauge field is present, the first type of excitation gets "eaten" by the Higgs mechanism. The second type of excitation corresponds to the Higgs particle. An $SU(2)_L\times U(1)_Y$ gauge transformation acts only along the "flat" directions of the Higgs potential. Those gauge transformations don't affect the radial direction, and this is the degree of freedom that corresponds to the Higgs particle. As a result, the Higgs particle is not charged with respect to the gauge group: it is its own antiparticle.
More formally, the two-component Higgs field $\phi$ can be written in the form
$$
\phi = U\left[\begin{matrix} 0\\ \rho\end{matrix}
\right]
$$
where $U$ is a $2\times 2$ unitary matrix that is affected by $SU(2)_L$ and $U(1)_Y$ gauge transformations, and where $\rho$ is not (by definition). The non-zero values of $T_3$ and $Y_W$ are carried by the factor $U$, but the Higgs particle correpsonds to oscillations of $\rho$ (about its vacuum expectation value). This is why having non-zero values of $T_3$ and $Y_W$ for the full Higgs field is consistent with the fact that the Higgs particle is its own antiparticle.
Textbooks typically mention this under the heading unitary gauge. Section 6.1 in Quantum Fields on a Lattice (Montvay and Münster, 1994) describes it in a non-perturbative context.