Here is a short, and as simple as possible explanation of gain and offset ("simple, but no simpler" explanation, to paraphrase a dead bad-hair guy :-).
When photons (light) hits a material, it emits photoelectrons (the "e-" that you see in camera specifications). The amount of photoelectrons that are emitted per photon depends is what is called the quantum efficiency ("QE" in camera specs) of the sensor. The most that you can have is one photoelectron per photon; this correspond to 100% quantum efficiency.
(BTW, the bad-hair guy I quoted above was the one who first explained this "photoelectric" effect, which also earned him a Nobel Prize. :-)
The photoelectrons are converted to a voltage (remember that an electric current is just a flow of electrons), and the ("analog") voltage is applied to an analog-to-digital converter (ADC, or A/D converter) into a discrete ("digital") binary number, after amplifying the voltage by a gain factor.
Since the numerical values of an ADC has a max value before it clips (a 16 bit number can only represent a value from zero to 65535), you adjust this gain factor based upon how much light hits the camera sensors. If the target is bright, you need to reduce the gain to keep the ADC from clipping. If the target is dim, you will want to increase the gain, to make use as many levels of the ADC as you can muster ("quantization noise").
The noise coming out of the ADU includes the quantization noise, noise from the amplifier, and the background light in the sky that also produces photoelectrons.
You can reduce the noise through "stacking." Each time you double the number of subframes in a stack, the variance of the noise rises by a factor of two (this is straight from probability theory). However, each time you double the subframes, the signal power quadruples (when you double a voltage, the power quadruples). This is how the signal-to-noise ratio (SNR) is improved by stacking. Statistically, the signal grows faster than the noise as you add more subframes.
Remember the photons? They cause photoelectrons, that in turn causes current to flow only in one direction. I.e., the voltage that reaches the ADC is always positive. So sky background will also only add noise only in one direction.
But the quantization noise is bipolar, and so is amplifier noise. As a result, stacking might not improve the SNR, but in fact, it potentially even make it worse.
To compensate for that, you apply an offset, so that under no circumstance does the the noise go negative. Everybody is positive and happy :-).
You want to apply as little offset as possible, since any offset will reduce the range of measurable voltage (the "dynamic range"). But too little offset will cause stacking to not improve, and possible degrade, the SNR. The latter is more important. So, if you are unsure, use larger offsets -- it usually only hurts dynamic range by only a little.
This short, simple minded explanation should be sufficent for you to Google for the finer details (how things really work :-) by looking up the terms that are not familiar to you.
Chen