Go to your Gmail webmail and Check that IMAP is turned on ClickHere
On your computer, open your internet browser and go to Gmail webmail. In the top right, click Settings (cogwheel). Click Settings. Click the Forwarding and POP/IMAP tab. In the "IMAP Access" section, select Enable IMAP. Click Save Changes.