BEIJING—Under fire from Chinese state media, Apple Inc. said it removed illegal gambling apps from its App Store in China—a move that could help quell the latest challenge for the American tech giant in its most important market outside of the U.S.

“Gambling apps are illegal and not allowed on the App Store in China,” Apple said in a statement Monday. “We have already removed many apps and developers for trying to distribute illegal gambling apps on our App Store, and we are vigilant in our efforts to find these and stop them...