Sounds like look you are using a very older version of OS X. Follow these steps below;
Open Mail and choose Preferences from the Mail menu.
Click Accounts in the Preferences window.
Select (highlight)your Google account on the left side of the window
Click the Account Information pane.
Re-enter your password *****
Then from the"Outgoing Mail Server (SMTP)" pop-up menu, choose Edit SMTP Server list.
Under Account Information, change the server to smtp.gmail.com (even if is already there,remove it and enter it again)
Click on Advanced tab.
Enter your full email address for username and enter your correct password (Make sure Password ***** ***** for Authentication)
Close it. Restart Mail.
Is it working now ?
If not, then follow the steps below;
Open Mail app. Click on Mail menu and select Preferences. Under Accounts, select you Google/Gmail account and then remove it by clicking - button. Then add it back there.
Please let me know if that didn't work, so we can continue troubleshooting.