The temperature gauge is controlled by the temperature sending unit. This is a one wire unit that looks like a small spark plug, not to be confused with the coolant temperature sensor. Check the connection and make sure it is getting good contact. Next check your hose connections. Make sure they are tight but do not over tighten them. There is a torque specification for hose clamps, but I do not know anyone who does this.
When the car cools down a vacuum is created and any loose hose will allow air to be sucked in and this will cause the gauge to fluctuate. Check the hose from the overflow bottle to the radiator. If it is cracked or loose it will also allow air to be sucked in as will a faulty radiator cap. Then check to make sure your fan is comming on when the engine temperature rises to the prescribed limit. If the radiator cooling fan is not working it also will cause the temperature to rise when you are stopped, then go back down when you are moving.