Joe Kissel at TidBITS covers the issues with Mail in Mavericks and Gmail:
Apple Mail in OS X 10.9 Mavericks treats Gmail accounts differently than any previous version of Mail did. Although some of the changes are quite clever and useful, the implementation is not without flaws. Your mileage may vary, of course, but based on my own experiences and those of hundreds of people who have commented online, Mail’s behavior with Gmail accounts — especially at first — leaves a lot to be desired. Here’s what I’ve observed and what you can (and can’t) do about it.
A pretty annoying bug, but Gmail has never really worked that brilliantly with Apple Mail, thanks in large to how Google implements Gmail over IMAP. I completely agree with Marco Arment’s view on this, however:
Gmail is a highly proprietary, constantly changing, email-like product. It is not standard IMAP email, and it will never work flawlessly in standard IMAP clients. (It never has.) Google has always supported IMAP reluctantly and poorly, and that won’t change — in fact, it wouldn’t surprise me if they removed IMAP support in the next few years.
Gmail’s primary, most important, and best-supported client will always be its web interface, with its own native mobile apps following. Everything else — especially standard IMAP clients — is a less-profitable nuisance to Google, not showing ads and holding back feature development by not being under Google’s complete control.
I’ve supported many clients who use a combination of Gmail / Google Apps and Apple Mail. The vast majority usually end up using the Gmail web interface or an alternative app, such as Airmail, simply because Apple Mail and Gmail just don’t get on. Is this the fault of Apple? Google? I put the blame almost squarely at Google’s door with their wacky IMAP implementation that tries to shoehorn Gmail’s features into a system that just isn’t designed for it.
If you’re using Gmail almost exclusively via IMAP then you’re just not using Gmail properly, which begs the question: why are you using Gmail in the first place? If the answer to that is “because it was free” then it might be time to switch.