Your iMac is running macOS, not iOS. Big difference with how the settings are presented.
Open your Mail.
Mail menu/Preferences
Choose Accounts.
Select your gmail account.
Click the (-) at the bottom of the account list, which will delete that account, if that is what you want.