However, this might give you a dissipation problem, if the currents are high;
Assuming a 1nF gate capacitance, this 180E resistor results in a linear operation of the mosfet for about 0.7uSec on each edge. This does not sound like much, but often this linear switching is the main contributor of total mosfet power dissipation.
With the mosfet directly to the CPU, this high valued resistor does not really matter because the current sourcing capability of the uC is limited anyway.
All that the resistor adds is a current limit to a more precise value (which is usefull from EMC perspective), and said cpu pin protection of course.
When currents increase, this dissipation can be a huge problem, so that's where mosfet drivers come in. These devices are just simple push/pull drivers, but with serious current capabilities, often like 1amp or more. With such drivers, you're usually dealing with gate resistors much lower in value, often between a few and 10 ohms.
So if the mosfet gets hot, you should consider a part with much lower gate capacitance or an external mosfet driver. Lower capacitance usually goes hand in hand with higher on-resistance, so that's not very helpfull usually, although there's an optimum between switching losses and conduction losses. Also the better the capacitance vs resistance ratio, the more expensive the mosfet gets.