The circuit is fine in theory.
Improvement in practice is required.
Adding a gate-source zener diode of say 12V (> Vgate_drive) is a very good idea indeed in all circuits with inductive load. This stops the gate being driven destructively high by "Miller capacitance" coupling to the drain during unexpected or extreme variations in drain voltage.
Mount the zener close to the MOSFET.
Connect Anode to source and Cathode to gate so that the zener does not usually conduct.
The 10k gate drive resistor (as shown) is large and will cause slow turn off and on and more power dissipation in the MOSFET. This is probably not a problem here.
The chosen MOSFET is very marginal in this application.
Far far far better MOSFETs available ex stock at Digikey include:
For 26c/10 Digikey IRLML6346 SOT23 pkg, 30V, 3.4A, 0.06 Ohm, Vgsth = 1.1V = gate threshold Voltage..
NDT3055 48c/10 TO251 leaded 60V, 12A, 0.1 Ohm, Vgsth = 2V
RFD14N05 71c/10 TO220 50V, 14A, 0.1 Ohm, 2V Vgsth.
ADDED
SUITABLE MOSFETS FOR 3V GATE DRIVE:
System just trashed my longer answer :-(.
So - MOSFET MUST have Vth (threshold voltage) of no more than 2V to work properly with 3V3 supply controllers.
None of the suggested FETS meet this requirement.
They may work after a fashion on the present load but are underdriven and overly lossy and the solution does not extend well to larger loads.
It seems that IRF FETS in size range concerned that have Vth (of Vgsth) <= 2 volts ALL have 4 digit numerical codes starting with 7 except IRF3708.
OK FETs include IRFxxxx where xxxx =
3708 6607 7201 6321 7326 7342 7353 7403 7406 7416 7455 7463 7468 7470
There will be others but all the ones suggested seem to have Vth = 4V or 5V and are marginal or worse in this application.
Vgsth or Vth needs to be at least one Volt less and ideally several volts less than actual gate drive voltage.
Best Answer
Your real question is how to control a 12V 4A motor from a 0-5V logic output such as from a arduino.
Probably the simplest way is to use a relay. Use a relay with a 5V coil and a low side NPN to drive it:
This can support relays that take up to 100mA or so to drive, which should be more than enough for relay run from 5V that can switch what you want. The other side of the relay is just like a ordinary switch. You put it in series with the 12V supply and the motor.
There are fancier ways to drive the motor, but this is simple, robust, and meets all the specs you provided.
Added:
You now say you want to control a 12V 500mA solenoid in stead of a 12V 4A motor. That is just like driving a relay, except in this case the current is higher and it will be powered from the 12V supply instead of the 5V supply. For the different supply the only change is to connect the high side of the coil and diode to the new supply.
The higher current procludes the relay drive circuit shown above. If bipolar transistors are used, more current gain is required than you can reasonably expect from a single part. This can be dealt with by using two transistors. I would just use a single logic level FET:
However, there are lots of ways to implement a low side switch for 12V and 500mA that is driven from a logic output.