Super sub Josh Maja ensured Simon Grayson's first game in charge of Sunderland ended with a win after the Black Cats came back from two goals down.
Andrew Tutte and Callum Reilly gave League One Shakers a comfortable early lead before Jack Rodwell halved the deficit shortly before half-time.
Sub Josh Maja scored from close range midway through the second half before a smart volley at the back post in the final stages sealed the comeback and the win in the opening game.
It was an emotional evening at Gigg Lane following the sad news that six-year-old Bradley Lowery had passed away this afternoon after a long battle with neuroblastoma.
Ahead of the game, in a classy gesture Bury confirmed all gate receipts from the game will go to Bradley's Fight, a charity set up in the youngster's name.
There was a minute's applause from both sets of fans before the game with the Sunderland players wearing black armbands as a mark of respect for the Blackhall youngster.
Fans then chanted 'One Bradley Lowery' during an emotion-fuelled tribute to a little boy who had captured the heart's and minds of the nation following his brave fight against cancer.
Grayson handed starts to Adam Matthews, who spent last season on loan at Bristol City, with Lynden Gooch and George Honeyman in the forward roles.
New signing Brendan Galloway, signed on a season-long loan deal from Everton, was not involved and neither was Joel Asoro after an extended break due to international commitments.
Lamine Kone found himself in trouble in the opening minutes, bringing down James Vaughan but he escaped punishment.
In the sixth minute, fans took to their feet to sing 'One Bradley Lowery' while images of the youngster were beamed onto the big screen throughout the game.
In the same minute winger Rees Greenwood had Sunderland's first sight, screwing his effort wide of the left-hand post, skipper Lee Cattermole fizzing a shot just wide moments later.
The hosts took the lead 19 minutes in, Tutte with a cushioned finish from the edge of the area giving Vito Mannone no chance.
Six minutes later it should have been 2-0, Zeli Ismail was in but screwed his attempt past the left-hand post.
The Shakers didn't have to wait long to double their lead; Reilly cut inside Adam Matthews before firing into the top corner in the 27th minute.
Jack Rodwell saw an effort palmed behind by ex-Sunderland stopper Joe Murphy moments later before the Black Cats did half the deficit in the 37th minute - Rodwell poking home a
George Honeyman corner from close range.
Papy Djilobodji was booked for a late challenge on Jermaine Beckford, while Luke Molyneux almost equalised in bizarre fashion, Murphy fumbled his effort onto the crossbar before gathering the ball.
There was widespread changes at the break with only Kone, Djilobodji, Honeyman and Gooch kept on by Grayson.
There were few chances of note in the opening 15 minutes of the second half, with the remaining Sunderland subs brought on after an hour.
Sunderland carved out their first real chance of the second half 63 minutes in, Wahbi Khazri driving an effort wide of the post.
The second half was dull, with clear chances or anything of real note very few and far between until sub Maja equalised from close range in the 77th minute.
It was a well worked goal, with Maja releasing Khazri in the first instance, the Tunisian showing a burst of pace before rolling the ball back to Maja who scored from six-yards.
The comeback was complete in the 86th minute, Denver Hume with the cross to the back post, Maja with a clinical volley to seal the win.
Full-time: Bury 2 Sunderland 3
SAFC: Mannone (Mika, 45), Jones (Love, 45), Kone (Ledger, 60), Djilobodji (Beadling, 60), Matthews (T.Robson, 45), Cattermole (Gibson, 45), Molyneux (Khazri, 45), Rodwell (E.Robson, 45), Greenwood (Maja, 45), Gooch (Hume, 60), Honeyman (Gamble, 60).
Goals: Rodwell (37), Maja (77, 86)
Booked: Djilobodji (41), T. Robson (69)
Bury first half: Murphy, Edwards, Aldred, O'Connell, Skarz, Ismail, Tutte, Dai, Reilly, Vaughan, Beckford.
Bury second half: Trialist, Jones, Leigh, Thompson, Dawson, Mayor, Cameron, Humphrey, Miller, O'Shea, Lowe.
Goals: Tutte (19), Reilly (27)
Referee: Darren Handley (Bolton)
Attendance: 2,110 (724 visitors)