Once a MOSFET is switched on, it will not switch off again even if the voltage is removed, because the parasitic capacitance between gate and source (1nF to 5nF typical) will store charge and will maintain the gate-source voltage even when the signal is removed. To remove this charge quickly, a resistor is required in parallel with this capacitor. Depending on how fast you want the MOSFET to switch off, the resistance value is chosen.
Consider the following:
Let gate source signal voltage = 10V
Let gate-source capacitance = 1nF
Let R = 1K ohm
T = RC = 1uS
So with 1K ohm resistor the gate voltage will decay to 3.7V within one time constant ie. 1uS. The MOSFET will practically switch off within two time constants.
If we used a larger resistor, say 10k, then it would take about 20 uS for the MOSFET to switch off completely after the signal is removed