Los Angeles has opened the season at 1-4, having lost its two road games in addition to suffering two setbacks at home.
The Lakers climbed within 70-67 with 8:27 to go on a dunk shot from Dwight Howard, but Foye then hit his three long-range shots over the next 1:40 to give the Jazz momentum.
Al Jefferson led Utah with 18 points and Foye had 17.
Los Angeles hit just 33 of its field goal attempts and went 4-of-23 from 3-point range. The Lakers stayed in the game by making 32-of-46 from the foul line.
Kobe Bryant was 15-of-17 from the charity stripe and wound up with 29 points for the Lakers. Howard scored 19.
The Utah bench outscored its Los Angeles counterparts 36-12 while snapping a three-game losing streak.