Gavin has signed a contract taking him to the end of season 2016/17.
Gavin took over as manager of Workington at the end of the 2013/14 season.
In his one season in charge the Reds finished 2nd to FC United of Manchester in the Northern Premier League but lost out to Ilkeston in the play-offs.
Gavin joined Queen of the South as assistant to James Fowler in June 2015 and was in caretaker charge for the final two games of the season.