After Effects - How to avoid annoying gradations if I render a mp4?
That's called: Banding. About Color Banding from Wikipedia:


  Colour banding is a problem of inaccurate colour presentation in computer graphics. In 24 bit colour modes, 8 bits per channel is usually considered sufficient to render images in Rec. 709 or sRGB. However, in some cases there is a risk of producing abrupt changes between shades of the same colour. For instance, displaying natural gradients (like sunsets, dawns or clear blue skies) can show minor banding.


In your case I assume that this is a compression issue. Movie containers like: mov, avi or mp4 only can have 8bit, but the preview is in 16bit or 32bit. If you render a image format that supports 16bit or 32bit (preferably exr, tga, tiff) instead of a video you should see no difference to your preview screenshot.

The simplest way to avoid banding is to add grain to your video. 


One option is to use generated grain shipped by default with After Effects. Just typing Add Grain in the Effects &amp; Presets window and apply this effect to your final comp. Note: A Intensity value of 0.37 or 0.4 should be enough to remove the banding and makes the effect not noticeable. 
Another option is to use scanned film grain from real cameras