1.Log in into your gmail account.
2.Click on the gear icon and click on setting.
3. Then choose Forwarding and POP/IMAP.
4. Enable IMAP and click on save changes.
5. After you have configured gmail IMAP, Open your outlook to add gmail account.
6. Open your outlook choose file and click on account setting.
7. On the pop up window, click on new.
8. Choose manual setup or additional server types, then click next.
9. Then choose POP or IMAP and click next.
10. Fill in the details as follows. Remember to use your gmail email address and the password. Then click on more settings.
11. Click on outgoing server and select my outgoing server (SMTP) require authentication.
12. Click on advance and enter below details and then click OK.
13. Click next and wait for outlook to test the connection.
14. If you get this error message
15. Log in into your gmail account and open an email from google
16. Click on the link shown above to turn ON allow less secure apps.
17. Repeat the process from step one. Then click on close and click on Finish.