The result means that Milan cut Inter's lead to five points - but with two games in hand, Inter are now in an even more commanding position. Sampdoria, meanwhile, remain 10th.
Hauge's late goal rescues a point for Milan. Sampdoria dominated the first half but couldn't find a breakthough: Gabbiadini and Thorsby were denied by fine Donnarumma saves, while Damsgaard missed a glaring opportunity when clean through.
However, the visitors eventually took the lead during a mad period in the second half. First, Quagliarella opened the scoring with an inspired chip from 30 yards. But moments later, Sampdoria were reduced to 10 men, when Silva picked up a second yellow. Milan pushed forward in search of an equaliser and it eventually arrived late on when Hauge curled in from 12 yards.
There was still time for Kessie to hit the post as Milan went agonisingly close to a winner, but the visitors held on for an impressive draw.