Both sides needed a victory on Saturday to have any hope of securing a top-seven finish in League Two and for a long time it looked as though Ryan Lowe's first-half goal might have kept Bury in with a chance.
Even though the Shakers had James Poole sent off in the second half they looked set to hold on for the three points until Akinfenwa's late strike.
Lowe scored on the stroke of half-time when he pounced on a slip by Craig Hinton to beat Jason Steele.
McKay, Ryan Gilligan and Andy Holt were all denied by Cameron Belford in the second half before Poole got a straight red card for a rash challenge on John Johnson after 66 minutes.
Akinfenwa then equalised when his deflected 15-yard shot beat Belford.