First-half strikes from Ben Smith and Theo Robinson set up Hereford’s success, watched by 6,020 spectators, to make amends for their 2-1 defeat at Blundell Park.
Club captain Smith opened their scoring in the 36th minute when he drove home a pass from Kris Taylor under the diving body of Mariners goalkeeper Phil Barnes.
Teenager Robinson doubled Hereford’s advantage three minutes before the break when he latched onto another pass from Taylor before beating Barnes with a low shot from 10 yards.
Hereford, however, had goalkeeper Ryan Esson – who was making his debut – to thank after he made two fine saves to deny Danny Boshell and Danny North.
At the end Hereford’s supporters raced on the field to mob their heroes after their second promotion in three seasons.