try to reduce the number of steps by opt(maxstep=n).
n is the number of step size. lets suppose 50 or 30. You can start with the largest number and then try to reduce it to minimum, until your system converges.
Just like Liudmil said, simply restarting the optimisation from the last geometry often helps.
Alternatively, you could try to add the SCF=QC keyword, which uses different (more precise) convergence criteria. This slows the calculation somewhat down, however.
The attachment shows the gradient, not the energy.
Restart the geometry optimization from the point with the lowest energy.
This oscillation often happens because the displacement is too large, so the calculation oscillates about a minimum. This is usually because one or more of the second derivatives is very close to zero.
opt(calcfc) will ensure that your calculation starts with accurate second derivatives (depending on the size of your system, this may be too expensive to be practical).
Like Rabia said, making the displacement (step size) smaller also often helps (the default corresponds to maxstep=30).
If your basis set includes diffuse functions you should use int=ultrafine rather than the default integration grid. If you are using the newer Minnesota functionals, you may need an even finer grid: int=superfine.
I agree with Metz and Antonov: Start the calculation over using the geometry from step 20/21 (whichever one is lower in energy) and use the calcfc function. If the system is smaller and/or you have a lot of time, you could also use calcall but that is a more expensive calculation. These functions can selected in the Gaussview window under the opt tab.
Alternatively, you could try using a qst2 or qst3 approach, but that might be where you got your initial guess in the first place.
As suggested in the answers above, optimization using opt(calcfc,maxstep=10) with the geometry of the lowest energy structure worked for me. Thank you.