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.
a webmail view of Gmail Settings

1. Open Outlook 2016 and go to the File tab.
view of Outlook 2016 File tab
2. Then, just above the Account Settings button, click Add Account.
view of Outlook 2016 Add Account button
3. Select Manual setup or additional server types.
shows Outlook 2016 account types
4. Now, on the Choose Your Account Type step, select "POP or IMAP".
view of Outlook 2016 IMAP choice
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.
shows server settings in Outlook 2016
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.
shows Gmail settings in Outlook 2016
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.
Advanced Settings in Outlook 2016
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.
Outlook 2016 test email successful
You'll get the "You're all set!" message,
10. Click Finish.
All Set message and Finish button.
11. And now you can check your email and "subscribe" to imap mailbox folders through Outlook 2016.
Outlook 2016 Gmail Inbox view