A gas control is a gate. It only opens when everything behind it is in order, and most "failed valves" are a gate refusing to open for a reason.
Precondition one: fuel
Mains or propane. On a rural parcel the second is common, and it brings its own equipment: a tank, a first-stage regulator, a second-stage regulator at the building.
Check the level first. A low cylinder produces a weak pilot and a feeble burner, which reads as a control failure.
Precondition two: pressure
Inlet pressure measured with the burner calling, not at rest. A valve rated for one pressure and fed another will misbehave without being broken.
Precondition three: air and draft
Dust is the local hazard. A blocked pilot jet, a fouled burner or a restricted termination changes the flame and the draft, and the unit locks out.
In this air district that is a routine finding rather than an exotic one.
Precondition four: proving
The flame must generate a signal at the thermocouple or sensor. Age and heat reduce it, and it fails when warm — hence the overnight pattern.
The test that concludes it
All four satisfied, and the valve still will not open or hold: the valve is the fault. Then it is replaced with one matched to fuel and rating, with new gaskets, a leak test and a full proving cycle.
Safety
Anyone who can smell gas should be outside before a call is made. Soot or spillage keeps the appliance off until it has been inspected.
What to have ready
Fuel, pilot behaviour, vent route.