Pretty close. There are several issues with how you set up your axes, both in the original domain and the Fourier domain. For one thing, you need to sample on a wider time interval than [-5,5] to get good frequency-domain sampling. Also, you need to scale G by dt/sqrt(s*pi).
AX=-ceil((N-1)/2):+floor((N-1)/2);
g = 1/(2*pi)*exp(-0.5*x.^2);
G=fftshift(abs(fft(g)))*dt/sqrt(2*pi);
h=plot(x(1:skip:end),g(1:skip:end),'ro', X,G,'-b');