Milan trail Juve by a point at the top but the Old Lady of Turin have a game in hand after their match at Parma on Tuesday night was called off due to snow.
Third-placed Udinese closed the gap to the leaders to three points with a 2-1 win at home to Lecce while fourth-placed Lazio are now just two points behind that.
Milan coach Massimiliano Allegri denied his side have made their title rivals' life easy.
"We played badly but there's still a long way to go, the road is not clear for Juve," he said.
"But I'm sure that this defeat will do us good. Even in recent games when we won we didn't always play well so this will serve us well."
Lazio coach Edy Reja was delighted with his team, who were missing several forwards.
"We had to keep things tight because Milan are good at breaking from deep," he said.
"We played well and gave away few chances. I've very satisfied with the lads who showed great determination in an emergency."
Antonio Nocerino had the best chance of the first half but his close range header was saved by Federico Marchetti.
But 14 minutes from time Tommaso Rocchi's clever dummy put Hernanes in and he hooked his shot across the Milan goalkeeper.
Hernanes could have put the match to bed after that but his shot from the edge of the box whizzed just past the post.
But Rocchi then made the points safe five minutes from time as he clipped home a cross from Senad Lulic.
Diego Milito scored all four Inter goals at the San Siro but Fabrizio Miccoli bagged a hat-trick for the visitors to earn a point and leave Inter boss Claudio Ranieri frustrated.
"This is also football, I'm a bit disappointed because Palermo scored four goals from five shots on goal," he said.
"But this was a great advert for football because it was between two sides who never gave up."
On a snow-covered pitch that made viewing the ball difficult, Palermo took the lead when Miccoli's corner somehow found its' way to the back post where Andrea Mantovani slid in to poke home two yards out.
But a deep ball into the box from Maicon caused havoc in the Palermo backline and the ball fell to Milito to shoot home.
Miccoli restored Palermo's lead with a left-foot shot but Ezequiel Munoz then brought down Yuto Nagatomo in the box and Milito despatched the resulting penalty.
Milito shot home from six yards to complete his hat-trick and put Inter in front for the first time just past the hour mark.
But Federico Balzaretti's driven cross from the left was met with a diving header by Miccoli, who nipped in front of Nagatomo to resotre parity again.
Milito again put the hosts in front with his fourth from close range as Giampaolo Pazzini's scuffed effort from Javier Zanetti's cross fell kindly to him.
But Josip Ilicic slipped in Miccoli to complete his treble with a cross-shot that beat Julio Cesar.
In Udine the hosts went in front when new signing Michele Pazienza took just two minutes to open his account on his return to the club, heading home Antonio Di Natale's free-kick.
David Di Michele scored with a stunning shot from 25 yards out on the left that flew inside the far post.
But Di Natale secured the win when he was fed by Antonio Floro Flores following a mistake from goalkeeper Massimiliano Benassi.
It was an entertaining game in Sardinia that saw Roma lose more ground in the race for a Champions League finish with a 4-2 defeat to Cagliari.
Thiago Ribeiro scored a brace for the the hosts with Mauricio Pinilla and Albin Ekdal adding the other two.
Goals from Juan and Fabio Borini had briefly given Roma a 2-1 lead.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional