This article explains how to set up Gmail in the Mail application on a Mac. Information covers the Mail application in all macOS and OS X versions.
How do I add a Gmail account to MacBook and Mac?
Setting up a Google Account in newer operating systems (after OS X Mountain Lion and Lion) uses automatic configuration. Here’s how it works.
Select the Apple logo > System Preferences.
Select Internet Accounts.