Though as someone said Thermocouples CAN go bad. Very rare
The thermocouple is two pieces of metal bonded or twisted together They are Two DIFFERENT metals (IE: copper and aluminum or steel) and when heated generate about 0.480 Volts.. This powers an ELectromagnet inside the thermostat valve.
The magnet is not strong enough to "Pull open" the gas valve. but when you push down on teh button or do whatever it says to do that opens the valve allowing you to light the pilot.
NOW.. HOLD THAT POSE (Button) for at least 1 full mintue after the pilot is lit
THIS IS THE #1 Failure mode (Operator error) in some cases 2 minutes.
Then releast it and turn the knob to ON.
Possible other issues
Bad thermocouple (Rare but it does happen)
Bad thermostatic valve (The magnet open)
Bad connection between them