The question regarding this concrete example was already answered, but I would like to point out that there's a more general logical fallacy in its premise.
In dimensional analysis, the argument of an analytic function cannot have dimensions, because if you were to expand the function in a Taylor series...
First off, what you mean here is of course not that every analytic function has this problem, but specifically analytic functions that are neither constant nor linear (which to be fair most aren't). Just because a linear function could be expanded into an infinite Taylor series doesn't mean that you need to consider this possibility and any ramifications arising from the $x^2$ term (with coefficient zero) that would occur in that Taylor series. Generally I'd say Taylor series are overemphasized in education: they are just a tool, one particular way in which functions can be expressed but not the canonical framework in which all analytic functions should be considered always. In fact, in many practical situations Taylor series have poor convergence; the function in your example is very inefficient to describe by Taylor expansion except for small $x$.
But even if we do use Taylor series... it's actually perfectly possible to have nonlinear functions whose argument is a dimensional quantity! Indeed, your correctly written function
$$\begin{align}
f &\colon \mathrm{length} \to \mathrm{length}^{-1}
\\ f(x) &= \frac1{\sqrt{2\pi}\sigma}\exp\left(-\frac{x^2}{2\sigma^2}\right)
\end{align}$$
is still an analytic function that can be expanded into a Taylor series!
Why,
$$\begin{align}
f(x) &= \frac1{\sqrt{2\pi}\sigma} - \frac{x^2}{2\sqrt{2\pi}\sigma^3} + \frac{x^4}{8\sqrt{2\pi}\sigma^5} - \ldots
\end{align}$$
Yes, we have terms with different powers of $x$ here, but each of them also comes with a corresponding power of $\sigma$ that cancels the dimension of that term. This drops out when you differentiate $f$ for the Taylor expansion. So in the end, it's again just a sum of terms that all have the same physical dimension of $\mathrm{length}^{-1}$.
What's true is that the special functions are defined to take dimensionless arguments. But that's not because they are analytic / can be Taylor-expanded, but simply because they're defined in purely mathematical terms that shouldn't have grubby physics in them. If the sine function allowed its input to have dimension length, it would mean a) it would have a particular length-scale built in b) it couldn't be used with e.g. times or temperatures as the argument.
Even so, one of the special functions can actually be evaluated on dimensional quantities quite reasonably.