IRF540 power Mosfet 12 volt motor gate resistance
The IRF540's maximum specified Gate leakage is 100nA at 25&deg;c, so theoretically you could use up to 1 Meg (for voltage drop of 0.1V or less). However leakage current increases with temperature, and such a high resistance could make the Gate quite sensitive to noise. 

Use the lowest value that meets your safety requirements. Anything up to 10k should be fine.