The Latics live to fight another day after their 1-0 defeat, on account of relegation rivals Rotherham and Millwall only drawing.
But it would require a remarkable series of scores in the final week of the campaign for them to escape the drop into League One.
The visitors, meanwhile, are still hopeful of regaining their Premier League status after a three-year absence.
The deciding goal came after 25 minutes when Afobe got his head to a free-kick by Bakary Sako.
Wigan, for all their possession, could not muster anything in response, and their frustration spilled over right at the death when James McClean was red-carded for his second bookable offence.
Wigan had started strongly and McClean’s early shot was unlucky to find the side-netting
A mistake from Richard Stearman then allowed Jermaine Pennant in, but his shot was tipped over by Tomasz Kuszczak.
The home side won a succession of corners that Wolves managed to clear, before the visitors took the lead on the 25-minute mark.
Emmerson Boyce fouled Scott Golbourne down the Wolves left, the right-back picking up a yellow card for his troubles.
Sako swung in the free-kick from the left that dissected the defence and goalkeeper Scott Carson, and Afobe nodded in at the far post.
It nearly went from bad to worse when Dave Edwards tried to slide in Nouha Dicko, and Wigan were indebted to Harry Maguire for getting a toe to the ball.
Wigan almost found an equaliser on the stroke of half-time when McClean pulled the ball back to Boyce, whose curling shot flew just over.
The home side started the second half with a bang with McClean at the heart of almost everything.
The Irishman headed over, stabbed a shot wide and then cut in from the right only to blaze his effort well over the bar.
Wolves thought they had found a second goal when Afobe again found the net, but flag was already up.
There was more danger when Dicko raced clean through, only for Carson to toe the ball away to safety.
Carson made an even better stop to deny an Edwards header at point-blank range, before Wigan mounted a late rally.
Substitute Billy Mckay fired goalwards only for Perch to unwittingly block the ball.
The Latics skipper then steered the ball into the net, only to turn and see the offside flag up.
By this point Marc-Antoine Fortune and Don Cowie had also been thrown on, and both made a difference in the final quarter.
Fortune saw a shot well saved by Kuszczak, before Cowie saw a shot hit the hand of a visiting defender only for the referee to wave play on.
Wolves threatened at the death when substitute Kevin Doyle looped a header over Carson only for Maguire to clear it.
But Wigan’s misery was compounded in the fifth added minute when McClean was shown a second yellow card for a late lunge on a visiting defender.