The 29-year-old forward, who is originally from Galway in Ireland, becomes manager Darrell Clarke’s sixteenth signing of the summer.
Gaffney, who stands at six foot tall, has spent time with Saddlers boss Clarke before having enjoyed a fruitful loan spell with Bristol Rovers during the 2015/16 campaign before making the move permanent at the end of the campaign.
The former Limerick striker scored eleven times in forty-seven appearances for Salford last season and has already notched up three appearances for them this season, two in the league and one in the cup.