Any algorithms better than polynomial regression I am trying to fit a baseline through my data, and I am not getting close enough with polynomial regression. I used gradient descent to set the parameters.
Are there any other ways or algorithms that could get me any closer? I want to make my baseline in blue look more similar to the actual data in red.

 A: Looks like a time series with very strong (and fairly regular) seasonality. If you use R, you might want to look at function stl(), or fit a basic structural model (an easy entry point function is StructTS(), otherwise there are several packages which afford you more generality and better control of the model you want to fit).
A: The answer is ARIMA models with Intervention Detection enabled. Intervention Detection will suggest level shifts/local time trends/seasonal pulses and pulses which are needed to aid the efficient identification/ robust identification of the ARIMA structure reflecting auto-regressive memory. Please post your data in column format and advise as to the frequency of measurement. It looks to me like you might be attempting to use a very dated procedure called Fourier (a pure deterministic structure i.e. no auto-regressive component ) which fits the data based upon an assumed structure but often (nearly always) doesn't deliver a good "explanation" of the data ... consequently a picture like the one that you presented. Kudos on asking the question !
IN RESPONSE TO COMMENTS BY w.huber AND OTHERS .....:
A point in clarification. Intervention Detection (ID) and Power Transforms(PT) like logs are forms of transformations. ID deals with adjusting vales for unspecified deterministic structure while PT deals with uncoupling error variance relationships with the expected value. The whole idea is to as little transformation as necessary much like a doctor prescribing the least form of treatment . As @w.huber correctly points out , you need to prove a dependence between the error variance and the expected value before you apply a PT. When (and why) should you take the log of a distribution (of numbers)? might help you.
A: Think you have your answer. 
But would add that it may be useful to log your data. Then consider doing regular (d) and/or seasonal (D) differencing. The resultant series should be much easier to model. I'm not confident d/D is necessary, but some form of transformation likely is necessary. Hard to tell from graph, but it appears that the volatility increases with time/linear trend. 
The models suggested (by the other answers) will give you better forecasts and decomposition of the series, but with some transformation of the time series you can often fit a good-enough polynomial. 
UPDATE:
(1) As mentioned below, it is unclear if the volatility is directly proportional to the level. If so log transformation is helpful. Otherwise perhaps not.
(2) Square root transformations are underused, but also often helpful in these settings. 
