Quit Apple Mail and turn on your Mac again. Turn off Gmail on your Mac, then turn it back on. Take Gmail off your Mac and then put it back on. Take Gmail out of your Keychain and type in your password by hand.