Select Text Tool Click and drag inside your image to size your textbox Enter in the desired text Select the Select by Color Tool Make sure Feather Edges is NOT checked Click on your text (make sure to get the colored portion, not just the box) Select the Blend Tool Select the desired Gradient by clicking on the image next to Gradient: Drag your mouse from one point in your text to another, the gradient will be applied to the entire area you've selected.
Note: The wider you make it the more color range you will get and the better your gradient will look.