After all, this expressions seems to tell that mass is due to coupling
strength. But why is mass ratio related in this "elliptical" way to
coupling ratio?
The relation between the couplings and the masses follows from the Higgs mechanism. It generates the masses for $W^{\pm}-,Z-$bosons. The masses depend on the $SU_{L}(2)$ gauge coupling $g_{1}$ and the $U_{Y}(1)$ gauge coupling $g_{2}$; precisely, the $W$-boson mass depends on the weak coupling $g \equiv g_{1}$ linearly, while the $Z$-boson mass is proportional to $\sqrt{g_{1}^{2}+g_{2}^{2}}$. From the other side, the EM coupling is proportional to $g_{2}/\sqrt{g_{1}^{2}+g_{2}^{2}}$. The ellipticity then follows from the simple trigonometric relation between the ratio $m_{Z}/m_{W}$ and $e/g_{1}$.
Such proportionality is the result of non-trivial "symmetry breaking" $G_{\text{electroweak}} \simeq SU_{L}(2)\times U_{Y}(1) \to U_{\text{EM}}(1)$, where $U_{\text{EM}}(1)$ (which is actually the EM gauge group) is the subgroup of $G_{\text{electroweak}}$ which isn't contained in $U_{Y}(1)$ or $SU_{L}(2)$ separately. Let's trace it explicitly.
The interaction of the $SU_{L}(2)\times U_{Y}(1)$ gauge bosons with the Higgs doublet $H$ is given by the lagrangian
$$
\tag 1 L_{H} = |D_{\mu}H|^{2}, \quad D_{\mu} \equiv \partial_{\mu} - i\frac{T_{H}}{2}g_{1}t_{a}W_{\mu}^{a}-i\frac{Y_{H}}{2}g_{2}B_{\mu},
$$
where $W_{\mu,a}, a = 1,2,3$ are the $SU_{L}(2)$ gauge fields, $B_{\mu}$ is the $U_{Y}(1)$ gauge field, $t_{a}$ are the Pauli matrices, $T_{H} = 1$ is the weak isospin number for the Higgs doublet, and $Y_{H} = 1$ is the hypercharge number for the Higgs doublet.
After the Higgs driven electroweak crossover the $H$ acquires non-zero VEV, $H \to H + v\begin{pmatrix} 0 \\ 1\end{pmatrix}$, which generates the mass term
$$
\tag 2 L_{\text{mass}}= v^{2}g_{1}^{2}|W_{\mu}|^{2} + v^{2}(g_{2}B_{\mu}-g_{1}W_{\mu 3})^{2}
$$
where $W_{\mu} \equiv \frac{1}{\sqrt{2}}(W_{\mu,1} -iW_{\mu,2})$.
One can introduce two linear combinations of $W_{\mu, 3}$ and $B_{\mu}$
called $Z$-boson and photon $A$,
$$
\tag 3 \begin{pmatrix} W_{\mu 3} \\ B_{\mu}\end{pmatrix} = \begin{pmatrix} \cos(\theta_{W}) & \sin(\theta_{W})\\ -\sin(\theta_{W}) & \cos(\theta_{W})\end{pmatrix}\begin{pmatrix} Z_{\mu} \\ A_{\mu}\end{pmatrix}, \quad \cos(\theta_{W}) = \frac{g_{1}}{\sqrt{g_{1}^{2}+g_{2}^{2}}}
$$
which diagonalize $(2)$:
$$
L_{\text{mass}} = \frac{v^{2}g_{1}^{2}}{2}|W_{\mu}|^{2} + \frac{v^{2}(g_{1}^{2}+g_{2}^{2})}{2}Z^{2}
$$
Note that the photon is massless, as it must be.
Therefore $m_{W} = \frac{vg_{1}}{\sqrt{2}}$ and $m_{Z} = \frac{m_{W}}{\cos(\theta_{W})}$, and
$$
\frac{m_{W}}{m_{Z}} = \cos(\theta_{W})
$$
The only thing which is remained is the calculation of the coupling $e$ to the photon $A$ in terms of the constants $g_{1}, g_{2}$. By using $(3)$ and the explicit form of the covariant derivative $(1)$, one obtains
$$
e =g_{2}\cos(\theta_{W})= g_{1}\sin(\theta_{W})
$$
Therefore, one obtains the desired result
$$
\left( \frac{m_{W}}{m_{Z}}\right)^{2}+\left(\frac{e}{g_{1}}\right)^{2} = \cos^{2}(\theta_{W}) +\sin^{2}(\theta_{W})= 1
$$
I also have another, minor question. I suppose that by e2 the authors
mean what is called the fine structure constant $\alpha$, and by $g^{2}$ what is
called $\alpha_{W}$. Is this correct?
It depends on the units which you use. For the case of natural units, the relations read $\alpha = \frac{e^{2}}{4\pi}$ and $\alpha_{W} = \frac{g^{2}}{4\pi}$.