Via the Official Google Blog:
Gmail adds IMAP support
“Are you guys ever going to do IMAP?” Well now I can say: Yes. Yes, we are doing IMAP. In fact, we are doing it for you for free on all devices and platforms.
This is great news, especially for iPhone users, (instructions here). Now, you can keep your mail account synched between multiple computers and devices.
UPDATE: Derek makes a good point about some advanced mail settings on the iPhone – make sure to align your Drafts, Sent, and Trash folders.