Mosfet gate voltage

I edited my first paragraph. I should have clarified that the voltage to the mosfet gate from the output pin is 2v and the rest of the circuit measures 5v where it should measure 5v. I'm having a hard time understanding why when I use the same ATmega chip, same mosfet motor circuit, and same power supply works as expected when the chip is in the arduino board but doesn't work when I have the Atmega chip on the breadboard as a standalone. When I say "works" I mean that I measure 5v between output pin and mosfet gate and the motor is running.
Thanks for the replies.