I have been fighting this problem for awhile. Have latest 2013 rMBP with latest Mavericks.
It has been somewhat intermittent. Apple Mail would not fetch latest Gmail but all my iDevices and web would get the mail.
I would usually have to reboot etc to get mail.
Yesterday the problem was very persistent and reboots did not work.
Went to Mail->Preferences->Accounts and checked accounts.
I noticed that my iCloud Mail account was set to Fname.Lname@me.com with an alias of Fname.Lname@icloud.com available but not checked. I believe Mavericks setup created the new icloud.com name.
I changed the checked alias to the "Fname.Lname@icloud.com" and saved it and my email started immediately.
Sucked down all the GMail. I also changed the description to "Fname.Lname@icloud.com"
Mail has been running great for over 24 hours.
One interesting thing is that when I checked today the Fname.Lname@me.com alias was not offered.
I think Apple Mail checking the me.com address was locking up all my mail (5 accounts)