Gai requires two chains of missions. First, complete the Team of Gai mission while you are a Missing-nin. Then complete the mission titled Team 9, The Best Taijutsu Team, which is available at ANBU rank.
That second mission has three requirements, and all three must be finished:
Since the wins must come against non-Team 9 opponents, pick a weak, commonly faced character and grind the matches rather than fighting other Team 9 users.