Every day we see people in the forums asking about getting back into their account. Whether they were hacked, forgot their password, or needing a 2-step verification code, these people can't get into their accounts.
If you have 2-step, you would have a code sent to your phone via SMS to give you access. If you forgot your password you can receive information via email or phone to regain access. Being less of an expert in account recovery, I am not going to get into the nitty gritty details of Google Account security, you can learn that from a friend's very detail post here.
What I am going to do is act somewhat like a parent and scold you, and implore you all to have backup recovery methods setup in your accounts. Its simple and takes only a few minutes to do everything.
First thing you need to go to https://myaccount.google.com/security. If you have 2-step verification setup, scroll down to the 2-step line item and click there (you may be prompted to enter your password). Now add phone numbers as backup methods to get your code. I have my phone and my wife's phone just in case I can't find mine (which never happens). Next print out your backup codes and keep them in your wallet or other secure location. I actually have them saved in a file stored on 2 different cloud storage accounts as well as in my wallet.
Now go back to the previous page and scroll down to Account Recover options. Here is where you would add your phone and alternative email address for assistance in regaining access.
You won't believe how many people only have their primary mobile number setup as their 2-step and the Account Recovery. If they lose their phone they are out of luck until they get a new phone with the same number. Even more often I hear from people that only had their primary mobile setup as recovery and 2-step and they went and got a new mobile number, forgot the password to their account and never added the new number to their account. Oy!!!!!
Well as a last resort users can go to the account recovery form here. This will take you through a series of questions that you must answer correctly in order to prove ownership of your account. Only then will Google allow you access again through this method.
Remember, if you have any difficulties or issues, you can always hit up the Gmail Product Forum for assistance.
Hope this helps, and please please please, setup all of your backup recovery methods. There really is no excuse.