What OS were you running before you upgraded? An earlier version of Sierra?
Was Gmail working properly for you in that previous OS?
MacOS 10.12 Sierra and its browser and email apps are long obsolete and no longer meet the security requirements of most internet services.
If it will work at all on that OS, you'll likely need to use an application password to regain access to your Gmail.
https://support.google.com/mail/answer/185833?hl=en-GB
Mail and Google's OAuth 2.0 policy - Apple Community
Your MacBook Air is capable of running a much more modern OS than Sierra. If you want to get the longest useful life from the machine you really ought to upgrade to a newer version of macOS. The 2017 MBA may be able to run macOS 12 Monterey, an OS that is five generations evolved from what you run now. A lot has happened with security and performance in the nine years since Sierra was released.
macOS Monterey is compatible with these computers - Apple Support