Land Rover Bar, who started the day as leaders, won the first race before defending champions Oracle Team USA claimed victory in the second.
The Britons' second-place finish in a closely fought final race was enough to secure a one-point victory.
The result means that Ainslie's team are top of the 2016 series leaderboard.
Ainslie, who raced with Oracle at the last America's Cup in 2013, is leading the team's bid to become the first ever British winner of the America's Cup.
"I think that for a new team to be leading the World Series now is a good indication of how far we've come, but there's still a long way to go," Ainslie said.
"The guys did an incredible job with the boat handling and that's what really got us out of some of the tough situations."
Britain's America's Cup team, led by Sir Ben Ainslie, claimed a tight victory on the final day of the World Series event in Portsmouth.