ALASHANKOU, China—The trains chugging along the ancient Silk Road through this gateway city to the West are growing in numbers and freighted with geopolitical significance.

China’s reboot of old trade routes—President Xi Jinping’s signature foreign-policy initiative, known as One Belt, One Road—was designed to link Chinese companies with overseas markets. Four years on, it is emerging as the cornerstone of China’s bid to be the guarantor of globalization at a time when protectionist winds are blowing abroad.