I see the required climb gradient as an imaginary steady climb path that you should always stay above.
I will be glad to stand corrected, but I want to see an official reference.
That's how I see it as well. A slope starting at the end of the runway below which you must not fly. Of course if you take off two thirds the way down the runway, achieve 12% gradient to acceleration then you can afford to fly a 2% gradient as you accelerate and still not dip below the imaginary slope. Maybe this is what people mean by an "average", but I don't think you can, for arguments sake, fly level at 100 feet for 4 miles and then do a zoom climb up to meet the altitude restriction and claim you have met the SID climb gradient requirements because your "average" climb gradient was 7% or what ever.
In my semijet we can't always make the SID climb gradients AEO and just have to use experience and common sense to decide whether we can accept a particular SID or not. If there is no alternative radar SID we might have to request a waver on the height requirements (obviously not an option if it is due terrain.)