Why do we get different imaginary parts of a zero centered Gaussian for the the same number of data points N?
Answer : When $x_2 = [-1024:1:1023]$, then $x_2[n]$ satisfies the condition $x_2[n] = x_2[(N-n)\mod N]$. That is why when $x_2 = [-1024:1:1023]$, then the FFT is real and hence the imaginary part is $0$. If you see the scale of the $y$-axis for imaginary part of $x_2$ plot, it is of the order of $10^{-17}$ which is almost $0$ in MATLAB.

Detailed Explanation:

When $x \in \{-1024, -1023, -1022,..., 0, 1, 2, ..., 1023\}$, then you get the following mapping :
$$\begin{array}{lcl}x[0] &amp;=&amp; {\rm gaussian}(-1024)\\
x[1] &amp;=&amp; {\rm gaussian}(-1023)\\
x[2] &amp;=&amp; {\rm gaussian}(-1022) \\ 
&amp; \vdots\\
x[1024] &amp;=&amp; {\rm gaussian}(0)\\
x[1025] &amp;=&amp; {\rm gaussian}(1) \\ 
&amp; \vdots \\
x[2047] &amp;=&amp; {\rm gaussian}(1023)\end{array}$$ Observe that $x[1] = x[2047] = x[(2048 - 1)\mod\ 2048]$, $x[2] = x[2046] = x[(2048 - 2)\mod \ 2048]$ and so on. This makes $x[n]$ real and symmetric mod $N$, which will in turn make $X[k]$ real and that is why you see that the imaginary part as $0$. MATLAB shows $0$ as values of the order of $10^{-17}$.

Do the same mapping for $x = [-1023:1:1024]$, and you will see that $x[n] \ne x[(N-n)\mod \ N]$ and hence imaginary part is not $0$.