After James Loney led off the second inning with a walk, Barajas wrapped a 3-1 pitch from Wade LeBlanc (2-4) around the left-field foul pole, handing the Dodgers a 3-1 lead.
Starter Ted Lilly (9-13) struggled through 5 2/3 innings, issuing four walks and five hits that produced a pair of runs, while striking out three.
The Los Angeles relief corps then took over, with Josh Lindblom, Scott Elbert, Mike MacDougal and Javy Guerra combining for 2 1/3 scoreless frames of scoreless relief to hand the Dodgers a three-game sweep. Guerra collected his 13th save.
LeBlanc ended up yielding four runs on six hits over six frames, and also drove in a run with a second-inning single.
Notable deaths of 2014 [PHOTOS]