With the Blue Jays trailing 7-6 in the seventh, Junichi Tazawa (2-1) walked Jose Bautista with two outs and Encarnacion then blasted a pitch into the left field stands for the decisive blow.
Encarnacion also launched a two-run shot in the fifth, finishing with four RBI, while Bautista, J.P. Arencibia and Colby Rasmus each drove in a run as Toronto broke a four-game skid.
Steve Delabar (2-1) was credited with the win despite allowing a walk and a three-run double to David Ortiz in the top of the seventh.
Casey Janssen tossed a 1-2-3 ninth for his seventh save.
Boston's Ortiz also cracked a solo homer, finishing with four RBI. The designated hitter has 15 RBI in nine April games since returning from an injury.
The loss snapped Boston's five-game winning streak.
Boston schools pull out free condoms over wrapping complaints
Aaron Carter is still in love with Hilary Duff