Gun safes are an important way to keep firearms and other valuables from people who should not have access to them. A keyed lock has always been a well-regarded feature since it provides only the holder of the key with access to the safe. When the key is lost, though, it makes it impossible to access the safe without an alternate plan.
Call the safe manufacturer's customer service department. If the company has a key replacement program, you'll be directed to the location of the serial number on the safe and sent a duplicate key.
A local locksmith knowledgeable about safe locks may be able open the safe with lock picks. Question the lock smith extensively about his experience working on your particular type of safe. If he has to learn on the job it may take a long time, which means greater expenses.
A final resort would be to break into the safe. Some are sufficiently weak enough that a prybar can jimmy off the front panel and give you access to the locking mechanism. Others might require an operator with an acetylene torch cutting a hole through the side.
Waiting a few days will often solve the problem with the key showing up in an unexpected place.