The gain parameter in confocal microscopy can be described as a relative measure of the amplification applied to the detection system. Higher gain results in brighter images since the signal used is increased. However, as well as increased signal, a higher amount of background noise will be detected. When the gain becomes too high, the noise detected will result in speckles over your image. At this point, the signal to noise ratio will start to decrease, and the risk of photobleaching the sample increases. The aim when setting your gain is to have the highest signal to noise ratio, not the brightest image.