A gas fireplace most frequently fails to light because the pilot light serving it has gone out, or because the igniter and thermocouple are dirty. Other reasons why gas fireplaces may fail to light include a faulty thermocouple and faulty valves or wires.
Systematic elimination can often be used to find the reason a gas fireplace does not light. If no gas is coming out of the pilot, then the problem is likely with the pilot light. If gas is coming out but does not ignite, then the problem likely lies with the igniter switch. If the gas lights but does not stay lit, then a faulty thermocouple is probably to blame.