There is a meromorphic continuation of $g(t)$ with only pole of order $2$ at $t=0$. To prove this, lets consider the Mellin transform $G(s)$ of $g(t)-1$. It is easy to see that $g(t)-1$ decreases exponentially when $t$ goes to infinity and that $g(t)\ll \frac{1}{t^2}$ when $t\to 0$. So, the integral
$$G(s)=\int\limits_0^{+\infty} (g(t)-1)t^{s-1}dt$$
converges absolutely when $\mathrm{Re}\,s>2$. Now, we have
$$\int\limits_0^{+\infty} e^{-t\sqrt n}t^{s-1}dt=n^{-s/2}\Gamma(s),$$
thus,
$$G(s)=\zeta(s/2)\Gamma(s).$$
For fixed $\sigma$ and $|T|\to \infty$, we have $\zeta((\sigma+iT)/2)\Gamma(\sigma+iT)\ll e^{-\frac{\pi |T|}{2}}|T|^{O(1)}$, so we can apply Mellin inversion formula to obtain the following:
$$g(t)-1=\frac{1}{2\pi i}\int\limits_{3-i\infty}^{3+i\infty} G(s)t^{-s}ds.$$
As $G(s)$ decays exponentially when $\mathrm{Im}\,s$ is large, we can move the contour of integration to the line $\mathrm{Re}\,s=-N-\frac12$. $G(s)$ has poles in the points $s=2$ and $s=-n$ for $n \in \mathbb Z_{\geq 0}$. Thus, using Cauchy's integral formula and estimating the integral over the line $\sigma=-N-\frac12$, we get
$$g(t)-1=\mathrm{Res}_{s=2}\,G(s)t^{-s}+\sum\limits_{n=0}^{N} \mathrm{Res}_{s=-n}G(s)t^{-s}+O(t^{N+1/2})=\frac{2}{t^2}+\sum\limits_{n=0}^N \frac{(-1)^n\zeta(-n/2)(-t)^n}{n!}+O(t^{N+1/2}).$$$$g(t)-1=\mathrm{Res}_{s=2}\,G(s)t^{-s}+\sum\limits_{n=0}^{N} \mathrm{Res}_{s=-n}G(s)t^{-s}+O(t^{N+1/2})=\frac{2}{t^2}+\sum\limits_{n=0}^N \frac{(-1)^n\zeta(-n/2)t^n}{n!}+O(t^{N+1/2}).$$
By the functional equation for the RiemmanRiemann zeta function,
$$\zeta(-n/2)=-2^{-n/2}\pi^{-n/2-1}\sin\left(\frac{\pi n}{4}\right)\Gamma(1+n/2)\zeta(1+n/2)\ll n^{n/2}.$$
Thus, the asymptotic expansion above is convergent and letting $N \to +\infty$ we prove (for $0<t<1$) that
$$g(t)-1=\frac{2}{t^2}+\sum\limits_{n=0}^{+\infty} \frac{a_nt^n}{n!}$$
with $|a_n|\ll n^{n/2}$. So, $\lim\limits_{n\to \infty} \left(\frac{|a_n|}{n!}\right)^{1/n}=0$ and the series for $g(t)-1-\frac{2}{t^2}$ have infinite radius of convergence. Thus, by analytic continuation, the function $g(t)-\frac{2}{t^2}$ is entire, as needed.