The water pump to my well doesn't shut off some times. The water pump pressure switch sticks on, either because of the switch or the pressure gauge. If I tap the switch box it will click off.

I have shut off the circuit breaker and loosened the nut (on the advice from a plumber). This helps for a short time. Do I need a new gauge (the current one is rusty and corroded), a new pressure switch, or both?