Gradient Fill a Curve

How to create a gradient fill on a curve like below: