How is the climb/descent performance affected by wind gradient?
You are correct. 

Suppose the headwind just 10 meters above you is 10 knots stronger then where you are now. Climbing the 10 meters will cost you some kinetic energy which is transformed to potential energy. Suppose you were flying 200 knots airspeed initially, you will end up with 198.1 knots airspeed if the transformation from kinetic to potential energy is 100%. 

I derived this from simple kinematic energy equations:

$\frac{1}{2}mV_0^2 + mgH_0 = \frac{1}{2}mV_1^2 + mgH_1$

$V_1 = \sqrt{V_0^2+2g(H_0-H_1)}$

But since your headwind is increased by 10 knots, your true airspeed will be 208.1 so it has increased by 8.1 knots. Free energy from the wind! 

Note that your groundspeed will reduce during such a climb, but you will be able to generate a higher than usual climb rate at constant airspeed in a positive gradient headwind field. 

Note that birds make use of this technique, for example the albatross can stay airborne for days with using only minimal energy for keeping in the air.

Albatross in windshear field (youtube)