Lots of ways to do it, but the easiest is to:
- Place a new layer above the shape layer.
- Ctrl (Cmd) click the shape layer to load it as a selection.
- Run a gradient down the selecting in the new layer, with the required gradient preset.
If you want to do keeping each section as a vector:
- Make several copies of the shape layer.
- Pull out guides (from the rulers) to mark the sections.
- Use the selection tool (A) to drag a box around the unwanted points in one of the shape layers, and delete those points.
- Use the Pen too to join the broken ends of the shape segment. (See this HELP page)
- Repeat for other shape segments on other copies of the shape.
Personally, I like to keeo things as simple as possible.
What version of photoshop are you using?
Perhaps a Gradient Overlay layer style or Gradient Fill Layer would work.