''It's always fun when you're winning, but this one we had to work a little bit harder for it,'' said Ball, who had 18 points. ''We dug ourselves a little hole, which is very hard against this team, the way they execute, but I feel like we pulled it out together.''
Los Angeles won its fifth straight and completed a sweep of a four-game road trip, the first time the franchise has done so since 2009. Isaiah Thomas added 21 points.
San Antonio is heading in the opposite direction, falling three spots to sixth in the Western Conference standings. The Spurs are a half-game behind Minnesota for fourth and home court in the first round of the playoffs and two games ahead of the Los Angeles Clippers for ninth place and an early end to the season.
''Halfway through the season we were aiming for the third spot and now we're aiming for the playoffs,'' San Antonio veteran Manu Ginobili said. ''A lot of things have changed. But tomorrow I'll wake up, I'll be optimistic and I'll work out, try to recover and try to get over this funk.''
The Spurs lost their second straight game in which they never trailed until the final two minutes. San Antonio blew a 15-point lead in a 121-116 loss to New Orleans on Wednesday and was up by 17 against Los Angeles.
Ball keyed the rally by hitting three shots from beyond the arc in the final three minutes. He finished 6 for 10 on 3-pointers.
''He's confident, just confident,'' Randle said of Ball. ''He went from hitting the side of the backboard to he can't miss now.''
Ball's fourth 3-pointer cut San Antonio's lead to 105-104, and Randle made two free throws to give Los Angeles its first lead at 106-105 with 1:59 remaining. After a jumper by Pau Gasol, Ball hit another 3 to give the Lakers a 109-107 advantage with 1:15 remaining. Gasol made two free throws to tie it, but then Ball hit another 3 to stun the Spurs' fans and electrify a large Lakers' contingent.
''Ball was amazing,'' San Antonio coach Gregg Popovich said. ''He just got them back in the game and at that same period we didn't make shots.''
San Antonio contained Ball and the Lakers early despite using their 22nd different starting lineup this season with Kawhi Leonard and LaMarcus Aldridge both out with injuries.
''They say when it rains it pours and it's pouring right now and it's pouring hard on us,'' Gasol said. ''No excuses, we've just got to get it done.''
Gasol finished with 19 points and 10 rebounds.
Lakers: Thomas has scored in double figures in six of nine games with the Lakers, including three with 20-plus. ... Lakers coach Luke Walton was assessed a technical foul after having an animated discussion with official Marat Kogut during a timeout with 1:33 remaining in the first half. ... Randle was assessed a technical foul after he continued to complain to official Jonathan Sterling several possessions after a non-call when Gasol blocked his shot.
Spurs: Aldridge missed the game with a sprained right ankle and Leonard continues to be sidelined by right quadriceps tendinopathy. ... Gasol is averaging over three assists for the 11th time in his career. Fellow former Lakers center Kareem Abdul-Jabbar is the only 7-footer with more, averaging 3-plus assists in 15 seasons.
Walton was asked if he felt vindicated after standing up for Ball after the rookie from UCLA got off to a poor start shooting 3-pointers.
''I'm happy for him because I felt like he was being judged so hard to start the season,'' Walton said. ''No other rookie in the league was getting dissected like he was. He was playing great, he was doing all the things we love about him. He was passing, he was playing defense, he was rebounding, he just was missing his shots. I'm glad for him (now that he's making shots).''
Lakers: Host Portland on Monday night.
Spurs: Host Memphis on Monday night.
More AP basketball: https://apnews.com/tag/NBAbasketball