@kardenlodge
Open Mail.app, and on the menu bar, choose Window and click Connection Doctor. On the following window, look at any of the lines that start with a red dot. One will probably be Gmail-IMAP or something similar. To the right will be an error message, what does it say? Is it an issue with a username/password? Or does it mention that some of the settings are wrong?
Apple keeps a log of common Email Service Providers and their settings. You can cross-reference the settings on your machine with the known good settings found here.
If it's a username/password issue, make sure you can still log into Gmail's webmail to verify you're using the correct username/password combination. By double-clicking the erroneous line in Mail Connection Doctor, it'll take you to the pane where you can input the correct password if necessary.
Hope this helps!