Bristol City 2 Wigan Athletic 2
The big centre-back had been partly at fault for City going ahead on 37 minutes, with Andreas Weimann punishing his mistake with a clinical finish.
But twice in the space of eight minutes, Dunkley made amends at the other end, by volleying home the equaliser on the stroke of half-time, before nodding Latics in front - both from Joe Williams corners.
Gavin Massey then squandered a gilt-edged opportunity to open up a two-goal lead on the hour mark when he was clean through.
And City got back on level terms on 84 minutes when Pedro Pereira was able to head home unchallenged from a right-wing delivery.
The result sees Latics climb to 18th in the table, three points clear of the relegation zone after 14 matches.
After a pretty quiet and cagey opening 20 minutes, Latics began to assert themselves, with skipper Sam Morsy - again playing in a more advanced midfield role - testing goalkeeper Daniel Bentley.
Jamal Lowe saw a shot deflected over the top, with the resulting corner from Williams finding Dunkley, but the header was tame and off target.
Latics were briefly threatened when Kasey Palmer was caught in the middle of attempting a shot or a cross, with the ball flying harmlessly past the far post to the relief of David Marshall.
The visitors dodged another bullet when Rodri headed straight at Marshall, after good work from Callum O'Dowda.
But they failed to heed the warning and, after Dunkley allowed the ball to bounce over his head in the box, the home side took advantage.
Dujon Sterling did ever so well to block O'Dowda's first effort, but he was powerless to prevent Weimann from slotting home at the second attempt.
Credit Latics for the way they responded, and they were denied a stonewall penalty when Lowe's searching cross clearly hit the hand of a home defender.
But with Paul Cook and his backroom staff still incensed in the technical area, his side exacted the perfect revenge for the injustice.
Williams' corner from the right was flicked on by Moore, and Dunkley lashed home at the far post with his left foot on the stroke of half-time.
Not content with making amends for his role in City's goal, Dunkley then struck again within eight minutes of the restart.
It could - and should - have been 3-1 just before the hour mark, when the visitors squandered as golden an opportunity as could be imagined.
Great work from Lowe and Moore saw Massey sent clean through the middle, in acres of space.
The winger did everything right, biding his time and drawing the goalkeeper.
But instead of slipping the ball sideways to Morsy, who would have had a tap-in, Massey elected to shoot for goal - and Bently made the block with his legs.
That was Massey's last involvement, Michael Jacobs taking over down the left, with Kal Naismith also replacing Williams, who'd just been on the receiving end of a hefty challenge.
Latics managed to keep their opponents at arm's length until six minutes from time, when City managed to get back on level terms.
Again it was a poor goal for Latics to concede, with City defender Pereira able to nod home a free header from a right-wing corner, for his first goal in English football.
It was more late drama to hurt Latics - on the back of the midweek defeat at Derby - and it almost got even worse just before the 90-minute mark.
Weimann found himself clean through and put his foot through the ball, with Marshall only able to make a parry.
The ball looped backwards over the Scotland international only to bounce against the bar...and behind for a corner.