What’s the relationship between gain (dB) and power (watts)?


Is there one?  My new used 300+ epic Bryston amp has a gain switch on the back toggling between 23 and 29 dB of gain.  
redwoodaudio
Gain is how much it's going to amplify the incoming signal. Less gain is usually quieter but if you have low gain signal going in, you may need more amplification to reach peak power.  
The relationship is logarithmic. For every increase of 3dB power doubles. For 10dB power increases ten times. 

In your case switching between 23 and 29dB of gain is 6dB. So whatever input it takes to drive the amp to full power at 23dB, it will reach full power with 1/4 that level when set at 29dB.
That gain switch is like a gas pedal. If the driver has a strong foot, then the pedal is set to 23 to take into account the heavier push to get full power. However, a driver with a weaker foot will set the gas pedal to 29, making it easier to push for full power. The engine does not know the difference nor cares.