Apple has released an update to Mail for OS X Mavericks that improves compatibility with Gmail.
Mail Update for Mavericks 1.0
This update improves stability and compatibility with Gmail, and includes fixes for users with custom Gmail settings.
For more information on this update, see: http://support.apple.com/kb/HT6030
You can get the update by selecting Software Update from the Apple menu at the top left of your screen.