You could use the Radial Gradient Tool on a selection of the area you want to apply the gradient to, you can click the gradient in the toolbar to edit.
Depending on the shape of the curve you may have to create it on a seperate layer then Edit > Transform > Distort.
By working within a selection (marching ants) you can control where the gradient is applied and by trasforming it you can alter the shape once applied.
There will as always in Photoshop be other ways, maybe using the Liquify filter to distort the shape for example?
regards
John
I applied the Radial Gradient tool to a quadrant selection then distorted with Liquify to get this amoeba!
I think is a fairly normal conundrum that the gradients do not conform to complex shapes. This can be done in Illustrator using ‘blend’ shapes but is vector rather than raster. If you have Illustrator you can create the object there and place as a smart object.
There was a real PS-geekfest a few years ago related to curved gradients wasn’t there?
With a Shape Layer, you could use a Stroke using Gradient : Shape Burst.
here is a method from another site.
Making a gradient follow selection contours? Go to Layer Styles, and pick the Stroke section. Set the size fairly large, the position to Inside, the fill type to Gradient, then the style to Shape Burst – and you’ll find that any gradient you choose, or that you design, will do exactly what you’re looking for.