After taking a 57th minute lead through Esteban Cambiasso, the home side levelled the score courtesy of a Miguel Britos strike on 79 minutes.
Three minutes later, Mario Balotelli hit the net just two minutes after coming on to win Inter the valuable points.
The visitors started the game brightly, and Zlatan Ibrahimovic tested Francesco Antonioli with two early shots.
Bologna had a great chance to take the lead on 40 minutes when Marco Di Vaio was found unguarded in the box. Julio Cesar had to run off his line and produce a crucial punch.
Cambiasso scored for Inter from a powerful shot, after the Argentine was set up by an Adriano flick from Douglas Maicon's cross.
Britos equalized for Bologna when he met a right-sided corner at Inter's far post. The strike is the Uruguayan's first in Serie A.
However, Balotelli marked his comeback to the Inter squad with a goal eight minutes from time, to ensure Inter's position at the Serie A summit.
The Rossoneri are now 12 points ahead of second-placed Juventus, who will play Palermo later on Saturday.
Watch the game's goals