Officials announced Friday that the United States Anti-Doping Agency has notified Silva, 42, of a potential violation from an out-of-competition sample collected Oct. 26.
UFC is seeking a replacement opponent for Gastelum (13-3). The 185-pound fight was slated to headline UFC Fight Night in Shanghai.
Silva (34-8) has previously served a one-year suspension for failed drug tests. The Nevada State Athletic Commission suspended Silva in 2015 and overturned his win over Nate Diaz at UFC 183 after it came to light that he had failed several drug tests before and after the bout.
The Brazilian legend tested positive for the anabolic steroid drostanolone, androstane and banned anti-anxiety medication.
During his disciplinary hearing with the NSAC, Silva maintained his innocence and said the failed tests were the result of an unmarked sexual-enhancement drug he received from Thailand.
Silva has just one official win since 2013. He was widely considered the greatest fighter in the world during his prime, which included 10 consecutive UFC title defenses between 2007 and 2013.