Climb angle and climb gradient are not the same thing in that one is measured in degrees and the other is measured in %. But they are simply two different ways of measuring the same thing.
As an example of this, a 3 degree climb angle equates to approximately 5% climb gradient. This is because the sine of 3 degrees is approximately 0.05 and % gradient is approximatley 100% x the sine of the climb angle.
If you increase climb angle you will also increase % climb gradient.
For JAR examination purposes both the climb angle and % climb will be greatest with zero flap.
Generally speaking increasing climb angle and % climb gradient will increase obstacle clearance. But we need to be careful when considering obstacles that are very close in.
Using zero flap will increase the take-off run, so we will lift-off closer to the obstacle. But our climb angle will be greater than when using flap.
Using flap angle up to the optimum value will reduce take-off run, but decrease climb angle. So the aircraft will lift-off sooner but climb at a lower angle.
If you draw these two situations on the same sheet of paper you will see that there is a point where the two climb paths cross. Before this point the aircraft with zero flap is lower than the one with optimum flap.
So for obstacles that are located before this cross-over point, optimum flap gives best clearance. But for all obstacle that are beyond the cross-over point clearance is best with zero flap.