Hi,
You can try this: open Microsoft Teams, go to your team name, and select More options (•••) > Manage team > Members, then choose Add member. Enter the Gmail address of the person you want to invite and select Add; if Teams says the email can’t be added, it may be because your organization’s settings don’t allow adding external users, or the Gmail user doesn’t have a Microsoft account linked to that address.
Could you check whether you’re using the free version of Teams or one managed by an organization? And do you know if guest access is enabled in your Teams settings?
Kind regards,