Login to your GMail and check the following steps given below for validation.
1. Click on the Gear Icon and go to ‘Settings’
2. Then, go to ‘Forwarding and POP/IMAP’ tab, and in the ‘IMAP Access’ make sure that IMAP is enabled.
3. Then go to ‘Labels’ tab and make sure the ‘Show in IMAP’ checkbox is checked, for all the System labels listed.