Stockport’s win at Peterborough means MK Dons will have to wait another day for promotion.
The Chairboys took the lead when Leon Johnson headed Russell Martin’s back-post corner into the middle for McGleish, who headed home on 37 minutes.
The Dons struck back with a classy move after 72 minutes as they kept the ball well before Keith Andrews slotted in Dean Lewington down the left who squared for Aaron Wilbraham to tap in.
However, McGleish stunned everyone with an amazing 30-yard volley that caught Willy Gueret off his line a minute later.
But O’Hanlon rose magnificently to head in Lewington’s corner and earn the Dons a point in the fourth minute of stoppage time.