Back-to-back Championship wins mean Mick McCarthy's side lie four points clear of the bottom three with seven games remaining, three points and five places below Leeds in 11th.
McGoldrick flashed an early header wide for the hosts but Leeds enjoyed the game's first clear-cut opening in the 11th minute.
Returning goalkeeper Scott Loach misjudged Stephen Warnock's in-swinging corner from the right and saw the ball cannon back off his crossbar before Paul Green's follow-up was cleared off the line.
Loach soon earned his spurs, thwarting David Norris - who was subjected to a frosty reception on his return to Portman Road - following good work from Steve Morison in the 13th minute and reacting swiftly as Paul Green again came close moments later.
Loach remained busy as the half passed its midway point, getting down sharply to keep out a well-hit Luke Varney drive before beating away Morison's header from the resulting corner.
Michael Brown glanced Warnock's cross over on a rare foray into the opposition penalty area but Tom Lees would inexplicably sabotage his team-mates' efforts just after the half-hour.
Referee James Adcock showed little hesitation in brandishing his red card in response to the ill-judged lunge on Jay Tabb.
Leeds reshuffled and initially coped with the numerical disadvantage admirably, Norris and Morison again going close, but McGoldrick showed poachers' instincts in first-half stoppage time to give Ipswich the lead.
Luke Hyam headed Carlos Edwards' cross against the crossbar and McGoldrick was on hand to nod into an unguarded net.
And he gave Town breathing space four minutes after the restart - Hyam was a more intentional architect on this occasion and a slight deflection on the striker's left-footed shot left Leeds keeper Paddy Kenny helpless.
Paddy Kenny prevented McGoldrick from completing his hat-trick in the 56th minute, but either side of that strike Loach saved with his legs to deny Morison from close range and Whites full-back Sam Bryam had a powerful header stopped from a Warnock set-piece.
Jay Emmanuel-Thomas responded by settling Ipswich nerves in style, drilling emphatically past Kenny after Aaron Creswell crafted the 68th-minute opportunity superbly.
The former Arsenal youngster rifled a volley over when attempting to double his tally shortly afterwards, while Kenny was forced to deny Tabb and substitute Michael Chopra in the closing stages as the trials of playing with 10 men visibly caught up with Leeds.