Since everything has been nicely documented by Gmail, we could just refer to them directly.
1. Getting started with IMAP for Gmail
Read this if you don’t know what IMAP is and why you should use Gmail’s IMAP
2. Enabling IMAP
How to enable IMAP on Gmail
3. Supported IMAP client list
including Outlook Express, Outlook 2003, Outlook 2007, Apple Mail , Apple Mail 3.0 (Leopard) , Windows Mail and Thunderbird and IPhone. Unfortunately, Blackberry, Symbian, Windows Mobile, and SnapperMail aren’t officially supported at this time.
4. Configuring Other Mail Clients
I’m currently using Opera to receive emails from Gmail through IMAP, make sure you follow and use the correct port number as documented