Asking many guitarists and bassists what the difference between gain and volume is—or even just asking what gain is—is a little like asking people whose picture is on a $10 bill.
Nobody knows. Or very few, anyway.
People handle $10 bills all the time, and yet most are hard-pressed to say whose picture is on them*. Similarly, guitarists and bassists use gain all the time, yet many would be hard-pressed to tell you clearly and correctly what gain is, exactly, and how it relates to volume. Granted, you needn’t be able to define “gain” in order to use it—you just know you turn that knob and something cool happens to your sound; usually something to do with distortion.
That’s perfectly OK, but if you’re new to amps—more specifically, new to buying an amp—it might help to know what gain is and how it’s related to volume, as the two are closely related.
Some amp basics are in order first. A guitar amp can be thought of as a device that has two stages. A relatively weak signal goes from your instrument into the first stage, where it is processed and handed to the second stage, which boosts it into a strong signal—the sound that then comes out of the speakers and rocks the Casbah.
That first stage is the preamp stage. On some amps, you can control the level or strength of the signal sent through this first stage; this control is called “gain” (also often labeled as “drive”). Gain can be thought of as the input volume to the preamp stage (gain adjustments can produce changes in overall volume, which might account for some of the confusion between the terms), although it’s more of a tone control than a volume control. Your gain setting determines how hard you’re driving the preamp section of your amp. Setting the gain control sets the level of distortion in your tone, regardless of how loud the final volume is set.
What this means is that your gain setting determines how clean or dirty your sound is regardless of the master volume setting. You can set the gain high for a dirty tone, but set the overall volume of that dirty tone from near silent to near deafening using the master volume control.
Master volume is an entirely separate entity that lives in the second stage of your amp, the power amp section. It provides the muscle. Think of it this way: the preamp (and gain control) provides the shape of the sound; the power amp provides the overall strength of the sound.
In amps with only a single volume control (and no gain control), that volume control is usually placed early in the signal path—in the preamp stage—thus controlling both volume and gain.
* Alexander Hamilton, first U.S. treasury secretary.