A Gmail account are being hacked and it's annoying to receive that kind of weird emails. Somebody must have tried to access your account.
Be it Gmail, Outlook, Yahoo!, one should always set a Two-steps authentication option to lock out the spammers.
Sign in to your preferred account, under the settings, navigate to Two-steps authentication and add your mobile number and recovery alternative email ID.
If Two-steps verifications are set successfully, whenever you singning in from unknown device or computers, you will be asked to enter the mobile number along with alternative email ID along with the one time password sent to your number and email to login and access your account.
This is the best option to keep the spammers out and secure your account.
Hackers never learns but always wins!