gain multiplies by a given value while offset adds a given value. this is true for color gain and offset also. think of a color value as 0 to 1 for each channel, R G B and A. 0,0,0 for an all black image and 1,1,1 for an all white image. or 1 for no opacity and 0 for full opacity. (different apps reverse this.) "Only has an effect if the texture is used as a bump or displacement" is misleading. that is the default behavior. but you can take the out alpha of a node and use that value for something. then the alpha gain and offset would have an effect. try this, create a nurbs plane, apply a blin shader to it. create a ramp texture and left mouse drag the ramp over the blin and "connect other" bringing up the connection editor. connect the out alpha of the ramp to the R G B values of the blins tranparency. then create a ramp from black (0,0,0) to white (1,1,1). render and check the alpha channel. the objects transparency mimics the ramp. then set the alpha gain to 0. and render again. now the values set in the ramp are all multiplied by 0. so the alpha is all zero. total opacity. then set the offset to 1. and the alpha has zero opacity. why? maya calculates gains first offsets second. if you gain a value down to 0 then add a full 1 back it will be 1. so if you want to reverse the alpha of an image you could use the reverse node, or just gain by -1 then offset by 1. another way to think of offset/gain is as brightness/contrast. if you were useing these for a bump value now you know futz with the values in an overal way before they get to the bump2d/3d node. hope that clears something up.
-hary
it's all just math