The middleweight fight headlined UFC Fight Night inside Mercedes-Benz Arena in Shanghai. Gastelum (14-3) floored Bisping with a left hand at 2:30 of the opening round.
For Bisping (30-9), it was his second loss in three weeks. He surrendered his middleweight title to Georges St-Pierre in a submission loss at UFC 217 in New York, then agreed to face Gastelum on short notice when original opponent Anderson Silva was flagged with a potential doping violation.
"I just want to say congratulations to Kelvin Gastelum," Bisping said. "Job well done tonight. I was enjoying myself, and he caught me with a good shot.
"God bless Kelvin. He's young. I've done this for a long time. I'm getting old."
Gastelum, 26, is a former welterweight whose power has translated well to the heavier weight class. Since moving up to 185 pounds, he has recorded three knockout finishes, although a first-round finish over Vitor Belfort was later changed to a no-contest.
It was the southpaw's stinging left hand that got the job done again on Saturday. Gastelum opened with a hard kick to the body, which caught Bisping's attention. But the primary weapon in his offense has always been the left hand, which he landed shortly after slipping a right cross from Bisping.
Bisping's legs went out from under him on the shot, and Gastelum followed with strikes. Referee Marc Goddard stepped in immediately to stop the fight.
Afterward, Gastelum called out interim middleweight champion Robert Whittaker. Whittaker (19-4) won the interim title last summer and was expected to unify the belts against St-Pierre. However, St-Pierre has already expressed interest in moving down in weight.
"This is the biggest one of my career," Gastelum said. "I have a huge amount of respect for Bisping for stepping up.
"I heard a rumor that Robert Whittaker needs a main event in February in Australia. I'm up for the challenge."
Bisping, 38, has stated that he intends to retire at a UFC event scheduled on March 17 in his native England. The card will take place at O2 Arena in London.
Saturday marked his 29th appearance in the UFC, most in company history. His 20 UFC wins are also tied for most all time, with St-Pierre.