Adesanya (17-0) knocked out his American opponent twice with all three judges scored the five-round bout for Adesanya. All three scorecards read 48-46, including 10-8 marks in the decisive fifth round.
Adesanya was knocked down early in the first round when Gastelum landed a left hook but gained the upper-hand in the second round and dropped Gastelum with a counter right hand.
He continued to his good form in the third round before Gastelum surprised him with a left head kick.
Adesanya, who becomes the 10th fighter in UFC history to win a belt with an undefeated record said after the fight: “I was ready for war. I told you all. “I wanted to take him out but I was ready for war because he is Mexicano.
“I am not one to quit,” Adesanya added. “I am strong mentally. I am bulletproof in the brain.
Adesanya will now face undisputed middleweight champion Robert Whittaker to unify the belts. Whittaker was forced to withdraw from a title defense with Gastelum earlier this year because of a hernia surgery.