MADRID—Talks between Spain’s prime minister and the leader of Catalonia’s pro-secession government ended Wednesday with Catalan President Carles Puigdemont saying “profound differences” remain on policy issues and on his wealthy region’s demand for a referendum on independence.

Spanish Prime Minister Mariano Rajoy and Mr. Puigdemont met for nearly 2½ hours to try to narrow differences on the budget, energy policy and the referendum issue. While both leaders described the atmosphere as cordial, Mr. Puigdemont said afterward...