Open your Image (Layer 1)
Add a layer (Layer 2)
Write text on layer 2 (color doesn't mind)
Select outside the text with the magic wand -> All but the text is selected.
On the layers window, click on Layer 1 (One). The selection remains.
Delete it (Edit > Delete).
Delete the Layer 2 layer. (Layers > Delete layer)
Or there is also a alpha mask plugin somewhere.