Danny Cipriani, playing his last game at the AJ Bell Stadium before moving to Wasps, exchanged penalties with Laidlaw to make it 6-6 at half-time.
Johnny Leota's try put Sale ahead after the break, before a further Laidlaw penalty kept the visitors in touch.
And the Scotland captain landed a late fourth kick to snatch victory.
In harming the Sharks' chances of securing a European Champions Cup place for next season, Gloucester also kept themselves in contention, edging to within three points of sixth-placed Northampton, who play Bath on Saturday.
The Cherry and Whites were good value for their win despite trailing for much of the second half, more than matching their hosts' physicality and producing a resolute defensive display.
Steve Diamond's side, who visit Newcastle in the final round of fixtures, are now all-but out of the play-off picture, as they remain five points behind Leicester in fourth.
Sale director of rugby Steve Diamond: "We gave away silly penalties but take nothing away from Gloucester, they came here to do a job and they did it.
"We can't take the credit away from Gloucester, you make your own luck. But you also contribute to your downfall and we did that magnificently well.
"It would have been nice to win and kept the record but it takes a bit of pressure off us in one respect, so we will get down to business on Monday and see where we're at."
Gloucester director of rugby David Humphreys: "From a psychological point of view, to win at Sale is a huge step forward.
"I don't think anybody can question the heart and character that's in this squad. There's huge fight, we have a competitive edge but what we lack in big games is a little bit of detail, a little bit of accuracy. That's the step forward we can make as a team.
"Greig Laidlaw hasn't played out-half for three years but you will struggle to see a better number 10 performance across the Premiership this weekend in terms of his control, composure, decision-making and defence. We had great shape and it just shows his quality as a rugby player."
Sale Sharks: Haley; Addison, James, Leota, Edwards; Cipriani, Stringer; Harrison, Taylor, Cobilas, Evans, Ostrikov, Neild, Seymour (capt), Ioane.
Replacements: Briggs, Lewis-Roberts, Mujati, Mills, Ioane, Mitchell, Ford, Jennings.
Gloucester: Atkinson; Cook, Trinder, Twelvetrees, Thorley; Laidlaw (capt), Heinz; Thomas, Hibbard, Afoa, Savage, Thrush, Moriarty, Kvesic, Kalamafoni.
Replacements: Cole, Wood, McNulty, Morgan, Evans, Braley, Creed, Ludlow.
Greig Laidlaw kicked Gloucester to victory over Sale to deliver a blow to the Sharks' top-six hopes and end their unbeaten Premiership home record.