Miroslav Klose scored the only goal eight minutes from time to extend Lazio's unbeaten streak to nine in all competitions.
Inter hit the post twice in quick succession in the second half, through Fredy Guarin and Antonio Cassano.
Lazio dominated the first half but was frustrated by the Inter defence. The Nerazzurri increased their efforts after the break before being stunned by Klose's goal, his 10th of the season.
''Lazio definitely did better in the first half and put us in difficulty,'' Inter coach Andrea Stramaccioni said. ''But we put on a great performance after the break and should have taken the lead. We absolutely didn't deserve to lose.
''We came out in the second half with a different spirit, the mental attitude of a great team. But Klose is a champion and he scored a great goal. This is the result and we have to accept it.''
Lazio moved provisionally level on points with third-placed Napoli, a point behind Inter.
''If we give 100 percent we can have games like this every week,'' Lazio coach Vladimir Petkovic said. ''We saw a great team out there, which was in difficulty for only 10 or 15 minutes in the second half.
''I always say that the team gives everything on the pitch and they also work for Klose, just as he then worries about scoring. He is a great champion and puts his skills at our disposal.''
Elsewhere, a late Antonio Di Natale strike helped 10-man Udinese snatch a 1-1 draw at home to relegation-threatened Palermo, which was denied a penalty.
Inter succeeded in frustrating Lazio but hardly had a sight on goal until nearly hour in when Guarin squeezed a shot from the edge of the area which scraped the outside of the right post.
Guarin went even closer in the 67th with a powerful, low shot which crashed off the right upright.
Inter was denied by the woodwork again five minutes later when Lazio goalkeeper Federico Marchetti pulled off a brilliant reflex save to push Cassano's effort onto the right post at full stretch. The rebound fell to Yuto Nagatomo, but Marchetti was again on hand to parry.
Rodrigo Palacio fired narrowly wide from the resulting corner.
Lazio should have taken the lead in the 79th when Klose beat the offside trap to run onto a great ball over the defense, but he opted to try and control rather than shoot first time and succeeded only in poking it into Samir Handanovic's hands.
Klose did break the deadlock minutes later as he fired Stefano Mauri's pass between two defenders and into the bottom left corner.
The Lazio striker was injured in the process and was substituted moments later.