Disclaimer: Diagnosis and repair should only be undertaken by qualified personnel.
A gas fireplace is a system that controls the flow of gas to a main burner where it is ignited to create your fire under the fake logs. A gas fireplace burns either natural gas or propane. Unless you see a propane tank in your yard, your fireplace probably burns natural gas.
The gas to your fireplace is regulated by a gas control valve that has a series of sensors and magnetic valves that open and close when certain heat conditions exist or don’t exist. Some fireplaces have many safety backup systems and others don’t. The latter are typically older gas fireplaces built when safety mechanisms were not as common.