To determine if you have a malfunctioning temperature gauge, you need to use a process of elimination. This is pretty easy to diagnose if you've got some basic hand tools, a length of wire and a bit of free time. Exact procedures will vary by make and model, but all should have a similar procedure for testing the temperature gauge.
Start the car and allow the engine to run for 15 minutes to bring it to operating temperature. Observe the gauge. If it peaks completely when the engine is stone cold or reading very low when you know that the engine is up to temperature, then it may be malfunctioning. Listen for the electric cooling fans and note whether they come on once the engine warms up.
Shut the engine down, pop the bonnet and locate the engine temperature sensor. You'll generally find it either right next to the water pump or on the engine block. Call up your local chain auto parts supplier; they should have a complete listing of your car's sensor locations. Identify the wiring harness and unplug it from the sensor.
Strip 3/8 inch of insulation from either end of a 3-foot jumper wire and twist the strands together tightly. Have an assistant turn the ignition key to the "On" position, but do not start the car. Plug one end of your jumper wire into the terminal in the wiring harness. If you have a one-wire harness, touch the other end of your jumper lead to the negative battery terminal. If you have a two-wire harness, plug the other end of the jumper into the other terminal in the harness.
Note what happens. If the gauge and electronics are functioning correctly, the temperature gauge should peg all the way at the top as if the car were overheating and the electric cooling fans should come on. If nothing happens, then you may have a blown fuse, a malfunctioning computer or a loose wiring harness plug. If the fans come on but the gauge remains dead, then the gauge is malfunctioning.
If your gauge works but still reads wrong, you'll need to test the temperature sensor itself. The shade-tree method is to pull the sensor out with it still attached to the wiring harness, turn the key to the "On" position and have an assistant hold the sensor's metal probe tip over a candle or lighter flame while you watch the temperature gauge. However, the safer and more accurate method is to immerse the probe tip in a shallow water pan and use a torch or hotplate to heat the water from room temperature to a rolling boil. Use a meat thermometer to ensure that the gauge needle rises linearly with water temperature.