Occasionally, I’ve run across instances where OS X has a problem resolving a DNS record that’s associated with Gmail. Specifically, we’ve had this issue with our Google Apps for Your Domain mail interface. Upon user login, a 404 error is returned yet the user can successfully login on another computer. This happens both from the web interface (in any browser) and through an IMAP interface such as Apple Mail. To resolve this issue, clearing the DNS via Terminal works:
$lookupd -flushcache
I haven’t figured out what causes this in the first place, but it doesn’t happen enough to warrant a full investigation…yet.