LISBON—Portugal’s days-old conservative government fell Tuesday when it failed to get its legislative program through a parliament dominated by a leftist alliance at odds with the eurozone’s prevailing policies of austerity.

Although the president could reappoint Prime Minister Pedro Passos Coelho as a caretaker until new elections next year, the vote strengthened a bid by the Socialist Party to govern instead.

The parliamentary rebellion was the latest sign of how austerity has altered Europe’s political landscape during years of recession: It has bolstered smaller parties that pledge to restore cuts in workers’ income and pensions, challenging fiscal restraints set by the European Union’s executive arm.

Under Mr. Passos Coelho, Portugal has seen four years of sharp spending cuts and tax increases imposed to meet the demands of its bailout lenders. While the economy is growing again, it shrank sharply between 2011 and 2013.

The 123-107 vote brought an automatic end to his government.