First of all, figure out whether it's your gauge, wiring or sensor. Remove the wire from the S terminal on the gauge and remove the ground wire from the gauge. Using a good digital voltmeter that measures ohms, first measure the continuity between the ground wire and a good know ground - that is there should be little or no resistance. Next, measure the resistance between the S wire and the ground wire. You should get resistance in about the 3-4000 ohm range if the engine is cold. Use a heat gun or some other heating source on the temperature sensor (or run the engine to normal operating temperature.) You should see resistance fall to under 1000 ohms. If all that checks out, you have a bad gauge. If resistance on the sensor does not fall when heated up, you have a bad sensor or a bad connection at the sensor.