Enable IMAP Access in Gmail: First, log in to your Gmail account and enable IMAP access. Go to Settings > Forwarding and POP/IMAP, then enable IMAP.
Configure Outlook 2016: Open Outlook 2016 and navigate to File > Add Account. Choose "Manual setup or additional server types" and click Next. Select "POP or IMAP" and click Next again.
Enter Your Gmail Account Details: Fill in your name and Gmail email address. For Account Type, choose IMAP. In the Incoming mail server field, enter "imap.gmail.com". In the Outgoing mail server (SMTP) field, enter "smtp.gmail.com". Enter your Gmail email address and password. Click More Settings.
Configure IMAP Settings: In the Internet Email Settings window, go to the Outgoing Server tab. Check the box for "My outgoing server (SMTP) requires authentication" and select "Use same settings as my incoming mail server". Then, go to the Advanced tab.
Configure Advanced Settings: In the Advanced tab, set the Incoming server (IMAP) to 993 and choose SSL encryption. Set the Outgoing server (SMTP) to 587 and choose TLS encryption. Click OK to save changes.
Import Emails: Outlook will start syncing with your Gmail account. Depending on the number of emails you have, this process may take some time. Once complete, all your Outlook emails will be available in your Gmail account under the "All Mail" label.