This is the Hellinger-Toeplitz Theorem. A solution, using the Uniform Boundedness Principle, is given in this MSE thread: Hellinger-Toeplitz theorem use principle of uniform boundedness. A proof using the Closed Graph Theorem is provided below.
We first prove that $ T $ is linear. Let $ \mathbf{x}_{1},\mathbf{x}_{2} \in \mathcal{H} $ and $ \lambda \in \mathbb{F} $, where $ \mathbb{F} $ is either $ \mathbb{R} $ or $ \mathbb{C} $. Then
\begin{align}
\forall \mathbf{y} \in \mathcal{H}: \quad
\langle T(\mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2}),\mathbf{y} \rangle
&= \langle \mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2},T(\mathbf{y}) \rangle \\
&= \langle \mathbf{x}_{1},T(\mathbf{y}) \rangle + \langle \lambda \cdot \mathbf{x}_{2},T(\mathbf{y}) \rangle \\
&= \langle \mathbf{x}_{1},T(\mathbf{y}) \rangle + \lambda \langle \mathbf{x}_{2},T(\mathbf{y}) \rangle \\
&= \langle T(\mathbf{x}_{1}),\mathbf{y} \rangle + \lambda \langle T(\mathbf{x}_{2}),\mathbf{y} \rangle \\
&= \langle T(\mathbf{x}_{1}),\mathbf{y} \rangle + \langle \lambda \cdot T(\mathbf{x}_{2}),\mathbf{y} \rangle \\
&= \langle T(\mathbf{x}_{1}) + \lambda \cdot T(\mathbf{x}_{2}),\mathbf{y} \rangle.
\end{align}
Hence,
$$
\forall \mathbf{y} \in \mathcal{H}: \quad \langle T(\mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2}) - [T(\mathbf{x}_{1}) + \lambda \cdot T(\mathbf{x}_{2})],\mathbf{y} \rangle = 0.
$$
By choosing $ \mathbf{y} = T(\mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2}) - [T(\mathbf{x}_{1}) + \lambda \cdot T(\mathbf{x}_{2})] $, we see that
\begin{align}
T(\mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2}) - [T(\mathbf{x}_{1}) + \lambda \cdot T(\mathbf{x}_{2})] &= \mathbf{0}, \quad \text{or equivalently}, \\
T(\mathbf{x}_{1} + \lambda \cdot \mathbf{x}_{2}) &= T(\mathbf{x}_{1}) + \lambda \cdot T(\mathbf{x}_{2}).
\end{align}
As $ \mathbf{x}_{1},\mathbf{x}_{2},\lambda $ are arbitrary, we conclude that $ T $ is a linear operator.
We now prove the continuity of $ T $. Let $ (\mathbf{x}_{n})_{n \in \mathbb{N}} $ be a sequence in $ \mathcal{H} $ that converges to $ \mathbf{0} $, and suppose that $ \displaystyle \lim_{n \to \infty} T(\mathbf{x}_{n}) = \mathbf{y} $. By the Closed Graph Theorem, it suffices to show that $ \mathbf{y} = \mathbf{0} $. We proceed as follows.
\begin{align}
0
&= \langle \mathbf{0},T(\mathbf{y}) \rangle \\
&= \left\langle \lim_{n \to \infty} \mathbf{x}_{n},T(\mathbf{y}) \right\rangle \\
&= \lim_{n \to \infty} \langle \mathbf{x}_{n},T(\mathbf{y}) \rangle \\
&= \lim_{n \to \infty} \langle T(\mathbf{x}_{n}),\mathbf{y} \rangle \\
&= \left\langle \lim_{n \to \infty} T(\mathbf{x}_{n}),\mathbf{y} \right\rangle \\
&= \langle \mathbf{y},\mathbf{y} \rangle.
\end{align}
Therefore, $ \mathbf{y} = \mathbf{0} $ as required.