When updating my OS X to Mavericks, the Mail app started to behave differently for my GMail (Google Apps) accounts.
Whenever I moved a message from my Inbox to a folder the message wasn't removed from my Inbox. On the forum and on some sites (e.g. DigitalTrends) the fix they mention, is to check the "Show in IMAP" setting in GMail.
For me that checkbox has always been checked, however the "Show in Label" was set to "hide". When I selected "show", it seems to have fixed the issue for me now too.
I'm happy with the above change in the GMail settings, it at leasts fixes the Inbox issue of Mail. If there was a fix for the retrieving mails issue as well, it would be awesome... but so far no luck yet.
Update: MacRumors mentions Apple is working on a fix for OS X Mavericks Mail App Issues.