Hi @PamudithaMadushanka-8226,
What's the version of your Outlook desktop client(File>Office account>About Outlook)? Please first ensure that you have updated to the latest version of Outlook.
According to my tests on Outlook 365 (Build 14026.20270), I could add Gmail account normally there. So in order to further confirm if your issue is related to your account or client, it's recommended to configure your gmail account in Windows Mail client on your PC or configure it on other Outlook desktop client to check if the issue has any differences there.
If the issue only occurred on your Outlook client, considering corrupted Outlook profile may also cause it, if you haven't tried it, it's recommended to create a new profile and readd your account to check if it could work normally in this case.
If your issue has any update, please feel free to post back.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.