The visitors had to be dogged and determined throughout to keep the dominant home side at bay, but Dave Kitson's second goal in as many games gave the Blades a 27th-minute lead.
Tony McMahon crossed deep from the right and the striker gobbled up the chance with a firm header from six yards.
Pools hit the crossbar through Antony Sweeney, while Andy Monkhouse sliced into the side-netting as Pools searched for a leveller.
At the start of the second half, Pools pressed with Sweeney twice and James Poole going close as they continued to press and the deserved equaliser came in the 77th minute.
Steve Howard blasted a low ball across the face of goal that evaded everyone. Jon Franks picked up the ball wide and Howard powered in his first goal of the season at the far post, but when Ryan Flynn crossed late on, the ball fell for Gallagher and he grabbed a decisive winner from 12 yards.