The IMAP IDLE protocol allows an IMAP email server to send out notification of new emails to a client. This means its a great way to implement a "push" email system that automatically sends messages out, instead of having to wait for the email client to poll the server (this is what happens, for example, when you set the "Check for new mail" interval in Mail.app). A new application called iMapIdle partially brings this functionality to the iPhone. Basically iMapIdle sits in the background listening for the IDLE commands ("even if you are in sleep/standby mode") and pops up an alert to tell you that email has arrived. You can then use the iPhone's built-in email application actually to get the mail.
Needless to say, this requires a hacked iPhone, and since it uses more data transfer it may negatively affect battery life (that said, the IDLE protocol is very bandwidth efficient). The other consideration is that not all IMAP servers are set up with the IDLE protocol enabled. Many are, however, and I've used IDLE based push email on my Treo for quite some time via ChatterEmail. Furthermore, iMapIdle has specific support for Gmail. I should note, however, that I have not actually tested this myself.