Setting up Gmail is a breeze with Apple’s Mail, but when you set up your Gmail account automatically with Mail, you'll end up with a POP configuration.
POP configuration is not bad, but there's such a thing called IMAP that makes Mail even more powerful. IMAP - which is short for Internet Message Access Protocol - is a powerful standard web protocol for email retrieval. One of the most useful benefits of IMAP over POP mail accounts with a desktop client is the ability to preserve what is called "message state information". When an email is marked as read in the desktop client, it reflects the same when you log into your email account, and vice versa - making your email experience unified from wherever or however you check your inbox. With a POP set up in Mail, you may have marked an email as read, but when you go visit your Gmail on the web, these emails will still be marked unread.
Simply put: IMAP unifies your web and desktop inbox.
This article will discuss how you can properly set IMAP for Gmail for Apple's Mail so you can enjoy a consistent email experience.