Turn off the power to the pump and drain the water from the well's pressure tank. There is usually a faucet at the bottom of the tank for this purpose.
Loosen the brass base on the old pressure gauge using a wrench. Do not try to turn the gauge itself because it will most likely break away from its base. Water will flow through the hole where the pressure gauge should be mounted and it is important to remain calm and complete the process carefully.
Clean the gauge and rub off any corrosion with fine sandpaper. Parts are not readily available for repair but it is possible that the gauge just needs cleaning. Clean out any debris in the mounting hole and place pipe sealing compound or tape on the gauge, taking care not to block the hole at the bottom of the gauge. If this is blocked, the water will not be able to pass through it and it will not work.
Screw in the gauge. Use your hands and take care not to cross-thread it. You will know it is cross-threaded if it is difficult to screw and it leaks after you have tightened it by hand.
Tighten the gauge with a wrench on the brass fitting at the bottom. Take extra care to only use the wrench on the brass base and not to over-tighten it. This could cause the gauge to break and water to pour out of the hole again.
Turn on the pump and check to see that the gauge is working and showing the correct pressure range. If it does not appear to be working you may have to replace the old gauge with a new gauge, following the procedures listed above. If the gauge still does not register any pressure, check the water pressure switch.