Yep, it's a "pirate treasure coin", imitating a Spanish-colonial gold 8 escudos, or "pirate doubloon". It will almost certainly not be made of real gold. You can buy gilt-plated pewter replica coins like this in bulk from "pirate supplies" stores. Such coins are often hidden, on beaches and elsewhere, by people playing a "find the pirate treasure" game with their kids. If the kids don't find them, someone else eventually does, and that someone else often ends up on a place like this forum asking about the coin they found.
So don't feel bad; you're certainly not alone.

Don't say "infinitely" when you mean "very"; otherwise, you'll have no word left when you want to talk about something really infinite. - C. S. Lewis