It is not possible to apply the gradient to the text as we do to the objects. You can add the gradient by outlining the text. But this makes it
unable to edit. Lets c how you can add the gradient and make the text editable at the same time.
With the Type tool, type some text in the font you like. I have used Klavika Bold Condensed.
Make the fill and stroke of the text none. This is done to prevent the peeking of original text colour from text edges when you apply the
gradient colour to the text later. This will also make transparent gradients in Illustrator CS4 to look correct. Otherwise, the colour of the
original text will show through your transparent gradient.
With the Selection tool, choose the text. Open the Appearance panel menu in the Appearance panel and select New Fill.
Apply the gradient and you are done!