Same technique as below, but with a different Shape, Repeat and a simple 2-color gradient. Then Color-Curves.
You could do this with the layerfx Gradient Overlay and get very precise results, because you can always preview and tweak the values until you are 100% happy. The problem is: it will give you jaggy edges.
As a workaround to this problem, you could make a rectangular selection around the text, fill it with any colour on a new transparent layer. Then make another selection from the text and fill the rectangle with a different colour.
With that layer as your base, apply the layerx Gradient Overlay, and finish your Stroke with a layermask.