OTTAWA—Canada’s economy unexpectedly shrank in October, following steep retreats in manufacturing and retail sales.

The result reflects an economy that has suddenly lost steam, and it is prompting some market watchers to wonder whether the Bank of Canada will be forced to revisit its relatively upbeat outlook.

Canada’s gross domestic product,...