Right-click the frame, and then click Select content.
Hollow handles appear around the frame, to inform you that the frame is converted to a graphic frame, and that content selection is active.
Using Area/Image colors palette, apply color and gradient to text.
Now, you can apply a gradient also on the shape (frame). Right-click the frame, and then click Select content again.
Black-filled handles appear around the frame, to inform you that the shape selection is active.
Using Area/Image colors palette, apply color and gradient to shape.
The text is still editable - it is not converted to outlines.
Note
The procedure is suitable for a small amount of large type, typically for headlines. If you apply it on long text in small type, it may be rather slow.