Gayle had made 38 off 18 balls for the Royal Challengers Bangalore when he swiped a Ravi Jadeja full toss towards the long-off boundary.
The ball was heading for Gayle’s fourth six of the innings but McCullum intervened to pull off what appeared to be a remarkable catch.
But the powerful West Indies batsman was told to stay on the field by the umpires who wanted to check whether the Kiwi had stayed within the field of play.
And slow-motion replays showed that while McCullum had kept his body within the boundary, his wide-brimmed sun hat had made contact with the rope and the umpires were forced to signal six and recall Gayle to the crease.
Legendary South African fielder Jonty Rhodes quickly had a tongue-in-cheek word to say about the incident.
“Hats off to a brilliant catch [sic] Brendon McCullum,” he said on Twitter.
Gayle, who had just passed 10,000 runs in T20 cricket, went on to rub salt in the wound by making a fine half-century before being trapped LBW for 77 off just 38 balls.