Step 1 : click your profile / display picture circle then click on account

Step 2 : Click the "Security" tab and then click "settings" next to App passwords.

Step 3 : In the first drop down menu Select what app name best suits what app you're going to be creating an app specific password ( in the this case were using mac mail, "Other (custom name) if for
another Application )

Step 4 : In the second drop down menu select the device that the application is on, in this case its a macbook.

Step 5 : Click the blue "Generate" button

Step 6 : Your new app specific password will appear in a yellow box, it will be a jumble of random numbers and letters 4 lots of 4 separated by spaces.

Copy this password ( Spaces do not matter ) and click the blue "Done" to proceed.

***IMPORTANT*** Make sure you don't copy anything else until this guide is fully complete, if so you will have to start from the very beginning. ***IMPORTANT***

Step 7 : Click the Mail application on your mac  ( If not in your dock it will be located in " Finder > Applications > Mail "

Step 8 : At the top of you mac in the task bar click "Mail" then "Preferences"

Step 9 : When the preferences window appears, click the accounts tab, then your Gmail account you want to add the app specific password too.

Once you have clicked the gmail account, Right click the currant password and click Paste. ( Assuming you haven't copied anything since then. )

***IMPORTANT*** if you have forgotten and copied something over the App specific password you will have to start this guide over again. ***IMPORTANT***

Step 10 : Once the app specific password has been copied into the password field, exit the preferences window.

You will Prompt if you would like to save changes. 

Click "Save" and you're done.