McGoldrick scored his first Premier League goal and pounced again to seal a stunning victory in the second period after Oli McBurnie’s fine header had given the Blades a 2-0 half-time lead.
This season keeps getting better for Chris Wilder’s side, who climbed up to sixth place, four points behind Manchester United, to give their Europa League hopes another big boost.
The manner of the Blades’ victory was even more impressive considering Chelsea had recently moved up to third spot in pursuit of a Champions League berth after winning five of their previous six league matches.
The Blues, roundly beaten in their first match at Bramall Lane in nearly 14 years, could slip out of the top four on Monday if both Leicester and Manchester United win their game in hand.
Chelsea began well. Christian Pulisic just failed to keep his header on target from Reece James’ excellent cross and the visitors looked menacing going forward.
But the Londoners have not been as impressive when defending in recent weeks and the Blades exposed that soft underbelly when taking the lead in the 18th minute.
McBurnie was picked out at the back post by George Baldock’s cross and, although the striker’s deflected shot was blocked by Chelsea goalkeeper Kepa Arrizabalaga, McGoldrick turned home the rebound for his first league goal in over a year.
Chelsea’s slick passing in the final third was often easy on the eye, but it met with stonewall resistance before the Blades doubled their lead with a superb goal in the 33rd minute.
Enda Stevens was sent clear down the left after playing a one-two with Ben Osborn and the wing-back’s pin-point cross was headed home by McBurnie into the top corner.
Chelsea responded through James’ thumping shot from outside the area, but home goalkeeper Dean Henderson was equal to it and the Blades held firm until half-time.
Chelsea continued to probe, but there was no way through and, after more good work from McGoldrick and McBurnie, Chris Basham’s curling cross from the right almost found Osborn.
Chelsea mounted some concerted pressure, but found every avenue on the edge of the Blades’ area blocked.
Olivier Giroud was sent on for Pulisic in the 65th minute and within moments volleyed just wide following a long ball over the top.
Cesar Azpilicueta’s vicious drive was deflected wide and Tammy Abraham fired off target from the resulting corner.
But the Blades cut loose again in the 76th minute. McGoldrick burst forward and sent substitute Lys Mousset down the right and, when Rudiger made a hash of his attempted clearance, McGoldrick pounced to kill the game off.
The Blades could have had another in the closing stages, but Stevens blazed over the bar following more slick build-up from the South Yorkshire side.