What part do you have trouble with? the recreation of the gradient, or how it affects the image?
In the gradient map editor, you can double-click on the bottom markers (called gradients stops) to change their color, and drag them around to re-create what you see... Click between two markers to add one, drag a gradient stop down to remove it.
In fact, you do not need the fourth gradient stop, the white one on the right side.
The top markers control the transparency (in regular gradients, gradient maps are unaffected)
With such a gradient map, the dark areas of the image will be white, neutrals will be black and light areas will be white.