MEXICO CITY—Pope Francis arrives in Mexico on Friday for a six-day visit that will end with a highly symbolic and potentially controversial act: the pontiff taking a stand on the fortified U.S. border to show solidarity with the migrants trying to cross it.

The pope’s gesture comes at the height of a rancorous U.S. political season in which immigration has become a hot-button issue.

Two...