This seems to help.
Assuming its the peak value that could be wrong, so "exclude" it
[idx,v]=find(ydata == a0); %a0 is max of ydata
try
[f,gof]=fit(xdata,ydata,gaussEqn,'Normalize','off', 'StartPoint',[a0,b0,sqrt(c0),d0]); %use c^2 instead of c to enforce postive sigma/fwhm
catch
[f,gof]=fit(xdata,ydata,gaussEqn,'Normalize','off', 'StartPoint',[a0,b0,sqrt(c0),d0],'Exclude',[idx]);
end