Rob Miller and Dan Braid scored two tries each as Sale moved up to fifth with victory over Gloucester.
Martyn Thomas went over to give the visitors an early lead, but Miller's two quick tries put Sale in front.
Charlie Sharples' score closed the gap, before Braid's first try gave the hosts a seven-point half-time lead.
The flanker went over again after the break and, despite three Freddie Burns second-half penalties, Sale held on for a bonus-point victory.
Gloucester's relentless pressure in the opening stages resulted in a second-minute try as Jimmy Cowan's grubber kick was bundled over the line by Thomas.
Burns missed the extras, as did Danny Cipriani at the other end when his clever flat pass saw Miller go over in the corner.
Great individual skill from Miller, who this week agreed a move to London Wasps, saw him dummy his way over for a second try in four minutes
Cipriani missed the conversion and Miller then put a penalty attempt short.
Sharples was first to react to a bouncing ball to score Gloucester's second try, but Burns's conversion drifted wide.
Gloucester's James Hudson was sin-binned and Braid quickly powered his way over for a try after a driving maul just before the break and Cipriani's conversion was the first successful kick of the evening.
Sale led 17-10 at half-time and constant early second-half pressure saw Gloucester reduced to 13 men, with Sila Puafisi being shown a yellow card.
Another Sale driving maul created the bonus-point try on the left-hand side for Braid, with Cipriani adding the extras.
Gloucester hit back with two Burns penalties to close the gap to eight points, but he missed his fifth and sixth attempts at goal.
Burns was successful, however, with three minutes to go to earn Gloucester a losing bonus point.
VIEWS FROM THE DRESSING ROOM
Sale Sharks director of rugby Steve Diamond:
"It's ironic that this time last season we were at the bottom of the league and 12-13 points away from the next team, London Welsh.
"We're in a different position now and the team has a lot of belief.
"Even though the team didn't play as well as they could have in certain parts tonight, we got the result."
Gloucester director of rugby Nigel Davies told BBC Radio Gloucestershire:
"We just had 10 minutes of madness at the end of the first half and the start of the second half."
"It's unacceptable, the consequences are that we've lost a game we should have won and I don't think we played anywhere near our potential - that's frustrating as well."
"There were quite a few players who I was quite pleased with, but the contrast with some of the other performances was stark and we've got to have 15 guys out on the field giving everything they've got and I didn't think that was the case."
Sale: Miller; Brady, Leota, Tuitupou, Cueto; Cipriani, Peel; Harrison, Taylor, Cobilas; Mills, Paterson; Braid (capt), Seymour, Gaskell.
Replacements: Cliff for Peel (44), Lewis-Roberts for Harrison (67), Jones for Taylor (67), Buckley for Cobilas (74), Fihaki for J. Mills (67). Not Used: Easter, MacLeod, Arscott.
Gloucester: Cook; Sharples, Trinder, Mills, Thomas; Burns, Cowan; Wood, Dawidiuk, Puafisi; Stooke, Hudson (capt); Kalamafoni, Cox, Evans.
Replacements: Robson for Cowan (58), Y. Thomas for Wood (58), Britton for Dawidiuk (67), Harden for Cox (51). Not Used: James, Kvesic, Knoyle, Monahan.
Referee: Matthew Carley (RFU).