Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
If you are sure that your safe is having the correct code entered, and that its batteries are still OK, then try entering the code again, only with your ear against the safe door near the latch. Does an audible click sound?
If so, your lock is in A-OK status, except for one thing: the latch has gotten stuck or jammed up a bit.
Rattle the latch a bit, to see if you can jostle it loose (not too roughly though, unless you want to break the safe.)
If that doesn't get it to open up, then you will have to try lock lubricant, or safe lubricant.
This is a silicone powder (and please note, any grease or oil or WD-40 or the like will gum up the lock and you will have more problems again soon with opening it! do not use anything but special silicone powder lock lubricant or safe lubricant.) It may be bought at most good hardware stores.
You blow a little powder lubricant into the crack between the door and the body of the safe, roughly where the latch is located. Then wait a bit, about an hour or two. Then try entering the code again and using the latch to open the safe.
If this doesn't work, then tell me, how old is the safe? if it is quite old and has never been lock-lubricated, it may simply be 'broken', unfortunately.