I looked at the Photoshop file, it is more or less the same as without gamma correction with BGRABitmap, except that there is some dithering. I thought about dithering and that could be an extra option to gradients. But that would not solve the problem when combining many times the same layer.
The only proper way, while still using layers, would be to use more precision for bitmaps, like 16 bits per channel, or floating point values, which is a bit out of the scope of BGRABitmap.
For the PNG, this derives from the PNG writer of Freepascal, which is not very optimised.
I guess that for the effect you are trying to achieve, it would make more sense to have an equation to generate the gradient in one step for each pixel. You could then as much precision as you want, and only reduce the quality in the end, when setting the RGB value for the pixel.