Google two factor authentication is causing problems for osx.
if you had your google account setup in previously, you only needed one password for all apps to use
now, if you have googles two factor auth, then you need to setup passwords for each app.
i think its from a change on googles part, where you could use an application specific password with multiple apps, but now you can only use it with one app.
to fix it, login to your google account [google.com/accounts]
add an app specific password for the app thats complaining [eg mail.app]
paste that password into mail.app
it will now work.
you need to repeat this for each app that uses google.
[ie, imessage / ichat, calendar, mail.app, contacts]