It's a scam. I get a couple a week.
So, your the password and email address information will have been hacked from a third party site, such as LinkedIn. It's then dumped in a big file which spammers "harvest" for these extortion or sextortion emails.
They'll then email the address with your password as "proof" they have hacked you. Sometimes they'll spoof the from address so it looks like they've logged in to YOUR gmail account to send the message to you. They haven't, it's very easy for them to spoof from their software.
The emails I get are all about porn and they say they've filmed me on porn sites and will send to my email contacts if I don't pay them bit coin. Blah blah blah
It's all fake...
computing.which.co.uk/hc/en-gb/articles/360001317945-How-to-respond-to-a-sextortion-email
If you Google, there's a lot of articles out there about this topic, which is reassuring.
What I would do is change your passwords everywhere. Your email, Facebook - everywhere!
Make them all slightly different. A good way to do this is put the name of the site ahead of your usual password. Let's say your usual password is cabbage123. You could change your password to FacebookCabbage123, GmailCabbage123 etc. This will mean if your password gets leaked in the future, hackers can't use it to gain access to any other site/email etc you use.
You can use a password manager to manage the different passwords if you prefer. Good if you're forgetful like me!
Check this site to see when your password was exposed (eg was it from the LinkedIn back of 2011 etc): haveibeenpwned.com/
Then, listen to this really really fab podcast episode which tells a mystery story and then explains why it happened - spoiler it's to do with hacked passwords (not boring at all, I promise!) gimletmedia.com/shows/reply-all/z3hler