I should note that Gmail uses a proprietary IMAP protocol that doesn't work well with Apple's Mail, which uses the standard IMAP protocol. It's not that Gmail accounts don't work in Mail, they do. But the implementation isn't smooth behind the scenes.
One example: Deleting a Gmail email in Mail can often result in the email just re-appearing for a varied amount of time because Mail and Gmail don't sync-up properly in a timely manner.