Simon Weaver's men were the better side for long periods, but failed to capitalise on some decent openings and were undone by Devonte Redmond's 51st-minute penalty.
It was the hosts who settled into Wednesday's contest the quicker and they went on to have the better of the opening 45 minutes, passing the ball nicely.
That said, City created the first real chance of the evening when Nathan Pond met Ibou Touray's 16th-minute free-kick from the right and forced James Belshaw into a fine save, touching the ball over this cross-bar.
Town responded with a couple of promising raids down the right, one of which saw Jack Emmett send Ryan Fallowfield scampering towards the byline where he stabbed an effort at goal that Chris Neal did well to block at his near post.
It was Weaver's team who continued to look the more likely, Warren Burrell failing to get sufficient power on a header from a Joe Leesley free-kick to seriously test Chris Neal.
The best opening of the half then came and went as Fallowfield got down the right and delivered invitingly for Mark Beck who completely missed a free header at the back post when he ought to have scored.
That miss was to prove costly.
Salford came out for the second period with more intent and made Harrogate pay for not capitalising on their positive start.
Belshaw had already pulled off a stunning double-save at point-blank range to deny Carl Piergianni when Fallowfield gave away a second penalty in as many games after Emmanuel Dieseruvwe got the wrong side of him in the box.
Redmond made no mistake from the spot, drilling a strike past the despairing dive of the home custodian with 51 minutes on the clock.
Belshaw then had to make another decent stop, springing to his left and again denying Piergianni before Town rallied.
They took the game to their visitors, but initially struggled to make much of an impression in the final third.
One delicious in-swinging Leesley centre from the right did pick out an intelligent run by Jack Muldoon, though Harrogate's top-scorer got too much on his header.
Another Leesley delivery then found Burrell at the back stick moments later and he nodded across goal for substitute George Thomson to head over from another promising position.
Town continued to press, however City kept numbers behind the ball and defended their penalty area superbly, holding out for victory.
Harrogate remain sixth in the National League standings despite the defeat.