This effect is known as “banding”. It is, as you correctly said, the result of only allowing a limited number of colours to produce a smooth gradient. This occurs in Unity, usually, because the texture is compressed when it is imported. If you want to get rid of this, then go to the texture import settings in the inspector, and select “Truecolor” in place of “Compressed”. Keep in mind that this does increase the memory usage of the texture.