OTTAWA—Mark Carney won the leadership of Canada’s Liberal Party on Sunday, putting him in line to replace Prime Minister Justin Trudeau and call an election that suddenly seems winnable for the country’s center left.