The Nerazzurri dominated throughout but the game was goalless at half-time despite the dismissal of home defender Maurizio Domizzi.
Mauro Icardi’s spot-kick opener was quickly cancelled out by Antonio Di Natale, yet Emmanuel Agyemang-Badu’s rash sending-off allowed Lukas Podolski to hit a winner.
Roberto Mancini’s men are now just two points behind fifth-placed Sampdoria and a shot at the Europa League qualifiers.
How Udinese managed to reach the break without conceding was anyone’s guess as Inter laid siege to their goal throughout the first half.
Orestis Karnezis saved from Fredy Guarin before denying Hernanes at his near post and, on the half-hour mark, the Brazilian headed into the Bianconeri goalkeeper’s arms.
Udinese were holding on but their mission became harder five minutes before the break, with Domizzi receiving a second yellow – and then red – for his late challenge on Hernanes.
Inter peppered Karnezis’ goal three more times before the interval, but neither Hernanes nor Guarin could convert clever pieces of build-up play.
They clearly needed a helping hand and it arrived in the 48th minute when Danilo fouled Mateo Kovacic in the box.
Icardi stepped up to stick the penalty past an immobile Karnezis and Inter had their goal.
Two minutes later, however, Udinese were level.
In a rare surge forward Allan picked out Di Natale, who skipped past Nemanja Vidic before beating his former team-mate Samir Handanovic with a cool finish off his right boot.
Inter tried to respond immediately having wasted so much time in the first half and Karnezis had to be at his best when Guarin and Rodrigo Palacio came knocking.
A moment of madness saw Udinese reduced to nine men. After being booked, Agyemang-Badu lost his temper with referee Gianluca Rocchi and saw a straight red as a result.
A two-man advantage proved more than accommodating to Inter and they quickly restored their lead through an unlikely source.
German forward Podolski rattled home the first goal of his six-month loan spell after his initial attempt span back into his path.
The Arsenal man fancied a second and just missed the far post with a long-range effort before Hernanes fizzed Palacio’s pass inches over the crossbar.
Improbably, though, Inter found themselves desperately hanging on to the three points as Udinese mounted a concerted late rally.
Deep into stoppage time, Allan provided the cross that substitute Stipe Perica headed towards goal, but Danilo D’Ambrosio was there to clear the ball off the line, saving the day.