Town led on seven minutes through Brett Pittman’s penalty, but two goals from Yanic Wildschut threatened to give Wigan their first home win since September 27.
However, Wigan could not find a third goal that would have surely clinched a very welcome three points.
And Pittman popped up with an equaliser midway through the second period after good work from McGoldrick.
With Wigan pushing for a late winner, they were caught on the break when McGoldrick headed home, in off a post, to the delight of the away fans behind the goal.
The home side got off to the worst possible start when Ipswich were handed a soft penalty by referee Keith Stroud.
As Tom Lawrence dribbled into the Wigan box, Dan Burn appeared to clearly win the ball before colliding with the Wales international.
But, to the dismay of the defender and all of his team-mates, the official pointed to the penalty spot.
Pittman was not hanging around to argue and sent the spot-kick coolly into the bottom corner.
Wigan were initially unable to rouse themselves into a response, with a Will Grigg header off Michael Jacobs’ cross, that flew comfortably into the arms of Bartosz Bialkowski, their solitary effort in the first half-hour.
But they kept at it and were rewarded with an equaliser 11 minutes before the break.
Bialkowski did superbly to get his right hand to a Max Power free-kick that swerved viciously in the air, but Wildschut was on the spot to smash home from six yards to make it 1-1.
Wigan almost took a lead into the interval when a driving run by Power saw him fire low towards the far corner, only for Bialkowski to again thwart him with a fine save.
The home side picked up where they left off in the second half and Wildschut fired wide and then straight at Bialkowski in quick succession.
Jake Buxton then wasted a great opportunity when he headed straight at the goalkeeper, who could only parry out a cross from Andy Kellett.
But the goal that had been coming eventually arrived just after the hour mark, when Wildschut beat three Town players down the Wigan left before slotting home into the top corner.
It was almost 3-1 within seconds as Bialkowski fumbled a long-range strike from Power, only to turn around and regather before it could roll over the line.
And Wigan were punished for their profligacy when Town equalised with their first attempt of the second period, Pittman again from close range after good work from McGoldrick.
Pittman spurned a gilt-edge chance to complete hit hat-trick, blasting high and wide from the edge of the area.
But the visitors did find a late winner when McGoldrick headed home from six yards in off a post.