Gain is just another word for amplification. When dealing with microphones and preamps, the issue is voltage rather than current or power, so an amplifier's gain is basically the factor by which it multiplies the input signal voltage. For example, if at a given moment an amplifier has 10 mV at its input and 100 mV at its output, then it has a voltage gain of 10.
Most often, people use decibels when describing the gain of an audio circuit; that factor of 10 in voltage would correspond to a gain of 20 dB.
> When recording I want to get as much gain from the preamp (to boost as close to true line level) as I can with-out getting noise. I would also want to keep the line level on the recorder as low as possible.
Those are generalizations, and I'd say that the first one is somewhat better than the second one, though neither one is all that great. You didn't mention overload, yet 6 dB of added noise (for example) is certainly preferable to 3 dB of hard clipping. So the overload limit is a more important consideration than noise alone, and limits your range of choices more severely as a consequence.
Here is my preferred generalization: Well-designed, well-chosen audio equipment gives you some latitude in your gain settings without forcing you to pay a serious price in terms of noise or risk of overload. You shouldn't have to keep the input gain setting on the recorder low and "swamp" its input with large signals from a preamp to get a good recording; nor should you have to do the opposite. There should be a useful range in which you can set the gains of the two pieces of equipment and still get optimal or nearly optimal results.
The assumption that the "unity" gain setting of a recorder (line input voltage = line output voltage) will give you the best signal-to-noise ratio is another generalization, unfortunately not one that's based on anything very reliable. There's no necessary relationship between that particular gain setting--which depends on design variables that are purely within the recorder--and the best possible combination of preamp and recorder gain settings, which depends on a larger, more complex set of variables. The two things have nothing directly to do with one another.
--best regards