Here is an animated picture of the functions:
The function $g_n(x)$ becomes a sharp peak at $x=0$ for $n \rightarrow \infty$
and, geometrically, it certainly does not disappear or becomes zero. Instead, it seems
that we get, in the end, what physicists know as a delta function. Informally:
$$
\delta(x) = \begin{cases}
0 & \text{for } x \ne 0 \\
\infty & \text{for } x = 0
\end{cases} \qquad ; \qquad
\int_{-\infty}^{+\infty} \delta(x) \, dx = 1
$$
Whatever definition might be the "rigorous" one, a
delta function,
roughly speaking, is just a very large peak near $x = 0$ with area normed to $1$.
Furthermore, it is typical that the following
function, triangular
as well, is indeed supposed to converge to the delta function - instead of becoming zero -
for $n \rightarrow \infty$ and nobody has any doubt about it.
$$
D_n(x) = \begin{cases}
n^2x + n & \text{if } -1/n \le x \le 0 \\
n - n^2x & \text{if } 0 \le x \le +1/n \\
0 & \text{everywhere else} \end{cases}
$$
The only thing that distinguishes $g_n(x)$ from $D_n(x)$ is that the maximum of
the former is shifted an infinitesimal distance $\lim_{n \rightarrow \infty}
1/(2n)$ with respect to the maximum of the latter at $x=0$.
So it's easy to
see that these functions become one and the same for $n \rightarrow \infty$:
$$
\lim_{n \rightarrow \infty} g_n(x) =
\lim_{n \rightarrow \infty} D_n(x) = \delta(x)
$$
Therefore, in the end, we have two arguments that, unfortunately, also
lead to different outcomes for the iterated limit.