Tommy Spurr gave Blackburn an eighth-minute lead following an error from Scott Carson, but Hanley was then dismissed shortly after the half-hour mark when he caught Nick Powell with a raised arm.
Wigan initially struggled to take advantage of their extra man, but substitute Grant Holt converted a corner with the aid of a deflection from Spurr before Boyce headed home Ben Watson's free-kick in injury time.
Owen Coyle's side climb up to 12th in the Championship as a result, while Blackburn remain ninth.
Spurr’s opener came after Wigan goalkeeper Carson had spilled Tom Cairney’s set-piece delivery.
Hanley’s exit made Blackburn’s task much tougher, however, and Holt drew the hosts level shortly after replacing Thomas Rogne in the 57th minute.
It appeared Wigan would run out of time in their bid to force victory, but captain Boyce had other ideas as he nodded home off the far post with full-time looming.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.