In addition to blending modes for layers, Photoshop allows blending modes for painting tools such as the Brush Tool, Pencil Tool, Clone Tool, and Gradient Tool.
You have the Gradient Tool set to the Screen blending mode.
Obviously, with a black and white gradient in "screen" mode only the white is going to have any effect. On masks, white shows, black hides. So without black, any gradient will appear to do nothing. However, what it's really doing is adding a black to white screen mode gradient, so it's lightening things. But if the mask is a "show all" mask - meaning white.... well nothing changes.
To correct the issue change the blending mode of the Gradient Tool in the Control Bar to Normal, or even Multiply.