Gray joined Leicester from Birmingham City midway through 2015-16 and went on to help the Foxes to a sensational title triumph that season.
He went on to feature 133 times in the top flight, scoring 10 goals and providing nine assists, but never really established himself as a first-team regular under Brendan Rodgers.
With his contract at Leicester having been set to expire at the end of 2020-21, Gray – who was linked with a number of Premier League clubs – has made the move to Germany.
The 24-year-old made just one league appearance this term, totalling 18 minutes, and joins a Leverkusen side who sit fourth in the Bundesliga.
Leverkusen had looked ready to mount a title challenge this season, but a run of just one win in seven games has seen them drop off the pace.