I don't know if GIMP has a "curves" tool that can map one channel to another through a dynamic curve, but that's how I always do these things in paint.net when I need transparency. I take the curves tool, select input channel = luminosity and output channel = alpha. Then if I want black to be transparent I set the curve so that 0 = 0 and 1-255 = 255. If I want white to be transparent I'll set 255=0 and 0-254=255. If I want a smooth transition from transparent to black I'll just make a straight line from 0 to 255 so that 255=0 and 0=255.
If I set the input channel to "hue" I can make any colour or combination of colours transparent.
The curves tool is very powerful, again not sure if GIMP has this but if it doesn't then it sucks...