If this is being solved in code, please bare in mind that the solution for:
bug #532309 ("Light-themes: gnome-panel background does not scale beyond 24 pixels")
will likely result in the panel-background being expanded vertical with a flat colour before the gradient. Simply turning the input texture up-side-down without taking note of the transformation geometry may not result in the desired concave look. A simply overlay as proposed by Marco in comment #4 shouldn't have a problem with this.
If this is being solved in code, please bare in mind that the solution for:
bug #532309 ("Light-themes: gnome-panel background does not scale beyond 24 pixels")
will likely result in the panel-background being expanded vertical with a flat colour before the gradient. Simply turning the input texture up-side-down without taking note of the transformation geometry may not result in the desired concave look. A simply overlay as proposed by Marco in comment #4 shouldn't have a problem with this.