Amplifier gain is simply the measurement as to how much an amplifier increases the voltage level of the signal.
For example if an amplifier had a voltage gain of 20, then a 1 volt input signal would provide a 20 volt output signal. Typical amplifier gain is around 25.
Of course the limit to amplifier gain is also defined by just how much signal increase the amplifier can product before it runs out of room to produce more. Its limits are caused by its power supply voltage output maximum and its ability to generate its gain into a low impedance load (a loudspeaker).
If an amplifier was rated at 25 watts per channel into 8 ohms then at maximum power it would be putting out 20 volts peak. If that amplifier had a voltage gain of 25, then them most voltage amplification it could provide into an 8 ohm load would be 20 (its max power before clipping) divided by 25 (its voltage gain) which yields 0.8V peak. Anything more into the amp than 0.8V just causes the amp to clip and badly distort.
If the amplifier was rated at 300 watts per channel into 8 ohms then at maximum power it would be putting out about 70 volts peak. That means the amplifier with a voltage gain of 25 could put out about 70V peak into the speaker. 70/25 yields 2.8V peak voltage input to make full power.
The voltage into the power amp is determined by the level of the signal into it. This comes from the signal level of the source recording, the gain of the preamplifier used, and the setting of its volume control. Your results will vary depending up the specifications of your equipment.
Oh, by the way amp power is determined is by taking maximum peak voltage output before clipping times .707 to convert to RMS voltage, that quantity squared, then divided by the load resistance (usually 8 ohms). Note that using this formula into a 4 ohm load shows double power into the load although the amplifier has not changed.
So gain determines how much the input signal is increased, power determines how much of the increase is possible before other factors such as power and load ratings take over.
Frank