Log into your Gmail account and open the Settings page with the little gear button. Click on the Forwarding and POP/IMAP tab and make sure IMAP is enabled and click on save changes.
1. Open Outlook 2016 and go to the File tab.
2. Then, just above the Account Settings button, click Add Account.
3. Select Manual setup or additional server types.
4. Now, on the Choose Your Account Type step, select "POP or IMAP".
5. Add your user information and your host server information,
Account type: IMAP
Incoming mail server: imap.gmail.com
Outgoing mail server (SMTP): smtp.gmail.com
Then add your logon information as shown below.
6. Go to More settings and select the Outgoing server tab. Check the box next to My outgoing server (SMTP) requires authentication and select the radio button next to Use same settings as my incoming mail server.
7. In the same window go to the Advanced tab and verify the following.
Incoming server (IMAP): 993 or 143
Incoming server encrypted connection: SSL
Outgoing server (SMTP): 465 or 587
Outgoing server encrypted connection: TLS or Auto
Click OK when finished.
8. Click Next.
9. If you've entered everything correctly, both testing tasks will be completed successfully and then you can close that little window and again click Next.
You'll get the "You're all set!" message,
10. Click Finish.
11. And now you can check your email and "subscribe" to imap mailbox folders through Outlook 2016.