Danilo Avelar came close for the home side early on, but he could only fire his shot wide.
The visitors then took the lead through Alberto Gilardino after he latched onto a through-ball, before sliding it past the keeper.
© Getty Images
Gilardino came close again soon after when he met a cross at the back post, but he volleyed over the bar.
The home side's hopes of getting back into the contest were boosted at the end of the half, as Thomas Manfredini was dismissed for picking up a second yellow card.
After the break Cagliari came close as Daniele Conti's powerful effort was tipped over by the keeper.
The hosts continued to dominate and equalised when Marco Sau hammered home from inside the box.
With the game heading towards a draw, Cagliari completed their comeback as Sau latched onto Nene's pass and fired in a strike to seal the win.