gain: the 'volume' that your guitar has when it enters your amp, too much gain causes distortion (effect wanted in rock/blues etc.)
Sustain: the ability your guitar has to keep the strings vibrating (due to the craft and woods of the guitar). More sustain, better guitar...