Gradient texture not showing up in render in Eevee
None of this really explains the difference between Viewport and Render, but here are a couple of things to try?
Hard to tell from your render, but you may be getting your gradient OK, just along the wrong axis? Given a full 3D vector, Linear Gradient seems to select X, for mapping. If your mountains are up in Z, you might want to isolate that value:

..if you wanted your gradient bottom to top.
You're using Generated coordinates, which measure 0-&gt;1 along the each side of your object's bounding box. The origin is at min(X,Y,Z) of that box. (If you rotate the texture without moving it first, that will be the center of rotation.) So there's another possibility...
Check that box by checking 'Bounds' in the object's Object Properties tab &gt; Viewport Display panel. If you have some extraneous geometry, and the box is much bigger than the bit of the object you're interested in, you may be at  one end of your gradient?