Mosfet transconductance in the saturation region
this equation is valid only in saturation mode which means:

Vgs &gt; Vth
Vds &gt; (Vgs-Vth)
and it is the derivative of the saturation current equation.
when Vgs &lt; Vth you're no more in saturation mode.
you can check on the web for (gm vs. Vgs) graph, where you can see that at Vgs&lt;Vth the gm=0.