I set up 2-step verification on my Google account. Been using the 12-inch G4 PowerBook because I just love that little thing. But GMail within Mail was out of action because PPC Macs don't work quite the same with some apps that access a 2-step verified Google account, Mail being one of them.
I searched the internet for the particular error message re incorrect password & discovered app-specific passwords to get around the issue. The website generated a 16-character password which I then applied to the GMail account in Mail's preferences.
Bingo! Job done, all fixed, access to GMail restored.