Lazaros Christodoulopoulos' 78th-minute penalty was enough to seal victory and move Bologna two points above the drop-zone and within three of their opponents.
The win was Bologna's first in five league games while Cagliari were condemned to a second consecutive defeat.
The game began quietly but home goalkeeper Gianluca Curci was called into action midway though the first half as Marco Sau got on the end of Victor Ibarbo's cross.
Just a minute later Ibarbo had a chance of his own but once again Curci was equal to it.
The game had sprung into life and Robert Aquafresca tried his luck down the other end to bring a first save of the afternoon out of Vlada Avramov.
Albin Ekdal then fired over the bar after being set up by Ibarbo but Bologna responded with Rolando Bianchi sending a diving header wide of the post.
Bianchi had another chance to open the scoring just before the break after being teed up by Christodoulopoulos but Avramov was on hand to save.
Ibarbo was proving a constant threat and he set up Matias Vecino in the early stages of the second period but his shot from distance was easily saved.
Archimede Morleo and Jonathan Cristaldo both fired over the bar from long-range as Bologna tried to get a foothold but it was Aquafresca who should have put them ahead with 20 minutes to play.
Cristaldo found the striker inside the area but Aquafresca fired wide of the post when he should have done better.
Christodoulopoulos tested Avramov from distance shortly after but the Greek was involved in the turning point of the match with just 12 minutes to go.
Daniele Dessena pushed the forward at the near post and, when the referee awarded the spot-kick, Christodoulopoulos found the bottom right-hand corner.
Curci was then called upon to make two saves from Mauricio Pinilla in the closing stages as Bologna held on.