1. Polyfit wouldn't make much sense because a Gaussian is not polynomial and would be badly approximated by polynomials.
2. The normalizer is irrelevant because you are multiplying it by some unknown. Also, since mu is the mean (and therefore determines the horizontal displacement), you could get rid of C. However, you need an extra pair of parentheses:
G = A * exp(-(1/2)*((X-mu)/sigma).^2);
Or you could get rid of mu and keep C:
G = A * exp(-(1/2)*(X/sigma).^2) + C;
Either way, you now only have 3 parameters to fit.