The four-time Olympic gold medallist won two of the three races with his Land Rover BAR team to finish top of the leaderboard with 26 points.
Groupama Team France are level on points but trail by one race win to the British boat’s two.
Ainslie hopes to skipper Britain to a first America’s Cup win in 165 years.
Portsmouth is the seventh stage of a lengthy qualification process that will count towards the 2017 America’s Cup Challenger Series, the winner of which will take on Oracle in the 2017 America’s Cup in Bermuda.
Ainslie said: “I was pleased with the way we regrouped for the final two races. We fought hard and kept going to come away with two wins.
“It was a day to keep your eyes open and keep fighting all the way because there were always opportunities to gain and lose.”
Defending America’s Cup champions Oracle Team USA are three points back on 23 alongside Softbank Team Japan.