BEIJING—China and Gambia renewed diplomatic ties Thursday, as Beijing signaled to Taiwan’s incoming president not to reverse her predecessor’s shift toward warmer relations with the mainland.

Beijing suspended its links with the West African country in 1995, after Gambia switched to recognize Taipei. However, in late 2013, Gambia severed those ties in hopes of resetting relations with China.

Beijing...