Gas Smell from Fire Place Key Valve
You certainly have a leaking gas valve.  Your symptoms of it leaking only when open are pretty common.

A while back, you could open up the valve and repack it; but, due to this kind of fix being temporary at best, your gas company and insurance company will demand the valve be replaced.  So, ignore any advice to repack the valve.

This means it's not a DYI job, as you'll need proof the work was done by a licensed professional, in the event someone asks.  Hire a professional, and keep the valve shut until you do.

They will shut off gas to the house, bleed the line free of pressure (gas) and then remove and replace the valve.  The real problems that come from such a repair come due to the pipes possibly being seized due to the mortar, or more likely corroded due to moisture (common in such lines).  In those scenarios, the details of your exact layout will determine how much pipe might need to be replaced, and how easy it may be to replace the pipe.

If a plumber just gives you a new valve, you're lucky.  If they find your pipes are nearly rusted through and you need to replace them, you might feel unlucky, but really you are still lucky.  You're just lucky with a bigger bill, but a much smaller bill than if you were looking at rebuilding due to a fire.