Chris Todd's header from close range gave Hereford the lead after Wrexham had failed to clear a corner.
The home side's pressure finally told on 58 minutes when an acrobatic overhead kick by Stephen Wright levelled the score.
Wrexham's Joe Clarke hit the post before Graham's late header secured victory for Martin Foyle's side.
It was Graham's first goal of the season to extend Hereford's unbeaten run to seven matches and inflict Wrexham's second home league defeat of the season.
It's also goof news for a club reported to be lsoing £8,000 a week since being relegated from the Football League last season.
At least the players are keeping their minds on their job as club officials and chairman battle to sort the business side out.