Substitute Tommy Johnson grabbed his first goal for Scunthorpe deep into extra-time to earn them a second round tie at Conference side Aldershot.
The veteran striker's shot deflected past Bury keeper Neil Edwards just as a penalty shoot-out seemed inevitable.
Billy Sharp twice came close for the hosts and Ian Baraclough was denied by Edwards while Bury's Simon Whaley saw his shot bounce off Paul Musselwhite.
Bury's Gary Flitcroft was sent off late on, seemingly for something he said.
Scunthorpe: Musselwhite, Byrne, Stanton, Butler, Williams, Sparrow (Johnson 105), Hinds, Baraclough, Corden (Taylor 58), Sharp, Keogh.
Subs Not Used: Evans, Ridley, Ryan.
Booked: Stanton, Baraclough, Sharp, Taylor.
Goals: Johnson 117.
Bury: Edwards, Scott, Challinor, Woodthorpe, Kennedy, Buchanan (Fitzgerald 118), Mattis, Flitcroft, Whaley, Adams, Reet (Tipton 55).
Subs Not Used: Dootson, Quigley, Youngs.
Sent Off: Flitcroft (119).
Booked: Woodthorpe, Scott.
Ref: K Woolmer (Northamptonshire).