Yes, power is a more important spec than gain. Here's a way to understand power amp gain in practical terms: let's say you have two amps, both rated at 100 watts power but one has 22db gain and the other has 27db. If you were to play music through each amp in turn, at a moderate level so that you are nowhere near their maximum power output, and you kept the volume control on the preamp at the same level, the amp with 27db gain would play 5db louder. Amps with lower gain can sometimes be better because you can use a wider range of the volume knob. With a high gain amp you might rarely get the volume knob much above 9 or 10 o'clock. A minor issue but something to consider.
Power is a measure of an amp's ability to do the work of moving the speaker cones. More power is usually better because you can play louder before the amp begins to produce noticeable distortion. As russ69 points out, due to how the ear works, doubling power output only makes the music slightly louder (3db). In order to make sound twice as loud before distortion you would have to increase the power by 10x. So to get twice as loud as a 100W amp you'd have to go to 1,000watts (assuming the speaker could handle it). More power is often better because you rarely push the amp close to its distortion, also known as headroom. For most people with average sensitivity speakers 100 to 300 watts is usually sufficient.