Travis Dodson, Josh Pauls and David Eustace also scored for the United States, which secured a fifth tournament title and a ninth medal. Jack Wallace was an accomplice of three goals.
Billy Bridges was the lone scorer for Canada, which defeated the Americans 2-1 in the preliminary round.
It was a rerun of the 2019 final, which the United States won 3-2 in overtime. The 2020 tournament has been canceled due to the COVID-19 pandemic.
Earlier on Saturday, Russia crushed South Korea 7-0 to claim the bronze medal.
The top five teams at the tournament qualified for the Beijing Paralympic Games in 2022. The Czech Republic beat Norway 2-1 on Friday to claim fifth place.
Farmer opened the scoring at 7:28 of the first power play. Dodson doubled the mark a few minutes later.
Bridges closed the lead to 2-1 with less than a minute to go in the first period.
Pauls also took advantage of a power play in the second period to put the Americans back to a two-goal priority. Farmer added a goal in the dying moments of the engagement.
Eustace sealed the outcome of the game in the last twenty.
–