Type your text. Right click on it and choose ‘Create Outlines’.
Select the Pen Tool.
Make a line with this with the Pen Tool. Use none color.
Select both the line and the text with the Selection Tool and click on Divide.
Select the upper part with the Direct Selection Tool.
Fill it with Gradient.
Do the same with the other part but put Location on 85%.
Your final text should look like this.