Kerber, who finished as runner-up to Tamira Paszek in 2012, challenged her Danish opponent throughout the 2-hour, 39-minute semifinal of fiercely contested baseline rallies.
"We had such tough battles in the past and today," Kerber said. "You know actually before you walk on court it will be a tough one.
"You will run a lot, so, you know, you just prepare your mind to be there for every single point, and just try to play your best tennis against her."
Gasquet eased past Denis Istomin of Uzbekistan 6-4, 6-2 and will be bidding for his 11th career title and first since Moscow in October 2013. Lopez reached his second final in two weeks by defeating American Sam Querrey 6-4, 7-6 (4). He will be chasing his fourth title and first since winning at Eastbourne last year.
Wozniacki, at first, held the upper hand by being the more aggressive player as she frequently came to the net, but after holding off three break points as she served out the opening set her challenge began to lose its intensity.
Kerber held a set point at 5-4 before winning the last six points of the tiebreaker to claim the second set, and in the third she finished strongly by sweeping five of the last six games.
"I probably should have closed it in two sets, being up a break and then being up in the tiebreaker," Wozniacki said. "But, you know, it happens. I'm looking forward to Wimbledon now."
She was also in a good frame of mind after her engagement to golfer Rory McIlroy was ended.
"Life throws you things that you didn't expect, but you just have to embrace it and move forward," she said. "It makes you stronger. I'm in a good place right now."
Keys, the youngest player in the top 50 at 19, will be contesting her first WTA final after previously being stopped in the semis three times.
She fought off three break points before taking the opening set with a single break, and a further break for 2-1 set her firmly on the way to victory.
The Associated Press contributed to this report.