Problem with PWM motor driver
It's pretty straightforward. Your 10k gate pullup resistor is too large. If the gate is pulled to ground, the MOSFET is turned on. When the gate drive is released, the gate voltage is pulled towards +12 by the 10k resistor. With a nominal Ciss of 1400 pF, the time constant is about 14 usec. To turn off the MOSFET gate will need to rise to ~2-3 volts below +12, which will take ~3 time constants, or roughly 40 usec. Since your PWM frequency is 25 kHz, the period is - you guessed it - about 40 usec. Just about the time the MOSFET is getting ready to turn off, it gets turned on again. 

You can do one of 3 things. First, you can reduce your pullup to 100 ohms or so. This will work pretty well, but the resistor will get hot (worst-case power will be about 1.5 watts).

Second, you can reduce your PWM frequency a lot, while reducing the pullup to about 1k or so. You will have more MOSFET power dissipation than you expect, but it may be within limits.

Third, (recommended) get a proper gate driver. I personally like the MAX4427/4428 series, but there are lots of others which will work just fine. You can even roll your own and get adequate results.