What could cause a gas fireplace to stop working during operation?
Hopefully your issue may just be a faulty wall switch or a short in the switch wire. You can check this by jumping the TH and TH/TP terminals on the gas valve. If the unit starts, this is your issue.

Another cause may be a dirty or faulty thermopile (the largest of the 2 sticks on either side of the pilot hood. A thermopile is basically a series of thermocouples put together to create a higher voltage (which will control the main valve section of the gas valve. A proper thermopile should give you above 250 millivolts when the pilot is on(250 being close to the minimum that most gas valves will be able to operate at). First try cleaning the thermopile. Then remove the 2 leads off the gas valve and take a reading between the red and white wires of the thermopile. Anything under 250 millivolts and it must be changed. If the thermopile checks out then your issue is most likely the gas valve, and the gas valve will need to be replaced.