Both teams hit the post in quick succession during the first half, with a 25-yard effort from Leverkusen midfielder Lars Bender followed by an angled shot from Miroslav Klose hitting the upright at the other end.
Leverkusen thought it had taken the lead on 69 minutes when Hakan Calhanoglu's shot was flicked in by Stefan Kiessling, who was ruled offside.
On 77 minutes, 20-year-old Senegal forward Keita, who had replaced Klose at the break, held off the Leverkusen defence to slot into the far corner.
However, the match was marred by allegations of racial chanting coming from the stands.
Australia winger Robbie Kruse started on the bench and came on in injury time.
Memphis Depay struck twice as Manchester United came from behind to beat Club Brugge 3-1 at Old Trafford while Sporting beat CSKA Moscow 2-1 in Lisbon.
BATE Borisov beat 10-man Partisan Belgrade 1-0 through Mikhail Gordeichuk's second-half header 15 minutes from time.
Partizan had earlier seen midfielder Marko Jevtovic sent off for a second caution in first-half stoppage-time.
Astana became the first Kazakhstan team to win a Champions League play-off match with a 1-0 home victory over APOEL Nicosia.
A fine header from Baurzhan Dzholchiyev on 14 minutes proved enough for Astana, which is aiming to make its debut in the group stages.