A finite horizon optimal stopping problem for an infinite dimensional diffusion $X$ is analyzed by means of variational techniques. The diffusion is driven by a SDE on a Hilbert space $\mathcal{H}$ with a non-linear diffusion coefficient $\sigma(X)$ and a generic unbounded operator $A$ in the drift term. When the gain function $\Theta$ is time-dependent and fulfils mild regularity assumptions, the value function $\mathcal{U}$ of the optimal stopping problem is shown to solve an infinite-dimensional, parabolic, degenerate variational inequality on an unbounded domain. Once the coefficient $\sigma(X)$ is specified, the solution of the variational problem is found in a suitable Banach space $\mathcal{V}$ fully characterized in terms of a Gaussian measure $\mu$. This work provides the infinite-dimensional counterpart, in the spirit of Bensoussan and Lions \cite{Ben-Lio82}, of well-known results on optimal stopping theory and variational inequalities in $\mathbb{R}^n$. These results may be useful in several fields, as in mathematical finance when pricing American options in the HJM model.