Shouldn't there be a constant of integration in there? When I solve for the integrating factor and integrate I get:

$\displaystyle \mathop\int\limits_{\substack{t=t_0 \\ y(t_0)}}^{\substack{t=t \\ y(t)}} d\Big[ye^{-t^2}\Big]=\int_{t_0}^{t} e^{-t^2}$

$\displaystyle y(t)=e^{t^2}\int_{t_0}^{t} e^{-s^2}ds+y(t_0)e^{t^2}$

Now differentiate $\displaystyle y(t)$:

$\displaystyle \frac{d}{dt} y(t)=e^{t^2} e^{-t^2}+2te^{t^2}\int_{t_0}^{t} e^{-s^2}ds+y(t_0)2te^{t^2}$

Now you can back-substitute that into the differential equation to verify the solution. Also, just for fun, you can work with it in Mathematica: define y(t), y(0)=a, differentiate it, substitute it back into the DE:

Code:

In[73]:=
y[t_] := Exp[t^2]*Integrate[Exp[-s^2],
{s, 0, t}] + a*Exp[t^2]
FullSimplify[D[y[t], t] - 2*t*y[t]]
Out[74]= 1