Solution :
Above mentioned error has become the lot more common since Google Maps started requiring the API key on June 22, 2016 this is after about 10 years of allowing keyless use of it. If you have started using the Google Maps on your website on or after June 22, 2016 date then you will need to sign up for it and also implement the API key the older users still do not need the key.
The fix is really simple for you: just replace YOUR_API_KEY on your last line of the code with the actual API key!
If you still don't have one, you can get it very easily for free on the Google Developers Website.
OR
You can also face the above error if the Billing is not set up correctly.
Google hands out the credit worth $300 or 12 months of free usage of the maps whichever runs out faster. After that you will need to enable the billing.
Hope this helps in fixing your Google Maps related issue.