Noah has posted a clear and concise HOWTO for getting GMail IMAP to work consistently between Mail and the iPhone. There are many, many tutorials on how to do this but none get it quite right if you are trying to sync an iPhone and Mail.app with GMail accounts. I was constantly having problems where mail deleted on my iPhone would not be deleted in Mail. Problems solved. This tutorial should work equally well for iPod Touch users.
In 2007: received 61,110 emails (mean 167.4 per day) sent 9,223 emails (mean 25.3 per day)