He is just testing his opponent while being certain and aware that he will be in not serious situation even if got hit.
Madara was only testing Gai while enjoying this battle which gived him challenge and made his blood boil in veins but also he was testing his own durability, defence and reaction. He wanted to see if Gai can push/force him to take hims serious or at least force to attack him as well as his defence could be not enough.
Madara was also getting better and better be being used to Ten tails power, he was also most likely interested to see how much Ten tails energy/chakra he need to tap into his attacks to keep battle enjoyable without roflstomping enemy.
As expierienced and incredible powerfull Madara wanted to see limit's of Gai power. He didn't want o squash him as no adult is going all out at children as Madara replied to Oonoki when he asked why didn;t he use PS against him. Besides Madara was took of guard by Gai's great performance which Madara clearly didn't expect or at least not to such degree.
Anyway just wait and watch Madara saying it is main turn now while going all out or slightly powering up to match or finish Gai.