KRAKOW, Poland—Pope Francis compared recent terrorist attacks to last century’s world wars, saying that “the world is at war because it has lost the peace.”

In remarks during a Wednesday flight to Poland, where he began a five-day visit, the pope also decried the slaying of a French priest by attackers who claimed allegiance to Islamic State and tied it to the killing of Christians by terrorists in other regions of the world.

“This...