Then in the 17th minute Pogba's fierce drive from long range came off the post, and moments later Manolo Gabbiadini had his volleyed goal disallowed for a foul he had committed in build-up to his strike.
Six minutes before the half-time interval Agliardi kept out a Nicklas Bendtner strike from 25 yards, before Pogba headed Pirlo's free kick just wide.
The Italian champions eventually went ahead nine minutes into the second half when Fabio Quagliarella tapped in Giaccherini's pass.
The Italian striker came close to making it 2-0 to Juve five minutes later when he tested Agliardi with a ferocious shot.
Then with 19 minutes remaining on the clock, Bologna equalised through Saphir Sliti Taider, whose right-footed effort from the edge of the area flew in off the inside of the post.
However, Pogba denied the visitors a remarkable draw when he nodded in Sebastian Giovinco's delivery from close range in the second minute of injury time.