President Anibal Cavaco Silva's office announced Gaspar's resignation on its website and said he will be replaced by Secretary of State for the Treasury Maria Luis Albuquerque.
Gaspar was a key member of the government as it struggles to repair its finances after needing a 78 billion euro ($102 billion) rescue two years ago. He was an economist who previously worked at the European Central Bank and had no political career before joining the government following its election in June 2011.
The government is under fierce pressure from opposition parties, labour unions and business leaders to move away from the austerity policies adopted by Gaspar as the country endures what is expected to be a third straight year of recession and a jobless rate of 17.6 per cent.
But Gaspar's exit is unlikely to herald big policy changes.
The austerity program is a requirement of the bailout creditors — the International Monetary Fund and other EU countries. If Portugal doesn't stick with the planned cuts and tax hikes the creditors can stop disbursements of the bailout funds, likely making it hard for the country to pay wages and pensions.
Portugal's European partners, too, have insisted that it sticks with its cost-cutting drive, regarded as crucial if heavily-indebted eurozone countries like Portugal are to break out of their three-year-old financial crisis. Portugal's government debt stands at almost 124 per cent of gross domestic product, the third-highest in the EU after Greece and Italy.
Furthermore, Albuquerque, Gaspar's replacement, has in the past fully backed the crackdowns on spending.
Gaspar said in his resignation letter that missing the budget deficit target for 2012, and then asking creditors to ease the target for this year, had undermined his credibility. He blamed those fiscal developments on a sharp drop in domestic consumption which, in turn, brought an unexpected fall in tax revenue.
The deficit last year stood at 6.4 per cent, above the 5 per cent target. The latest review softened this year's deficit goal to 5.5 per cent from 4.5 per cent.
Also, Gaspar said in the letter emailed to reporters by the finance ministry that there was "a significant erosion" in public support for the austerity strategy as street protests and strikes have grown in recent months.
He said the intended new phase of the recovery, with a hoped-for increase in private investment this year, required credibility and public confidence in the government. He said he "cannot provide those contributions."
Gaspar's insistence on tax hikes and public sector pay cuts has angered the junior partner in the centre-right coalition government, the Popular Party, but Prime Minister Pedro Passos Coelho's Social Democratic Party, the senior alliance partner, has stood by him. That has contributed to political tension around the terms of the bailout.
"The risks and challenges of the near future are huge," Gaspar said, adding that the Cabinet required cohesion and that his exit would help achieve that.
Under Gaspar, Portugal's fortunes haven't improved. The jobless rate is forecast to reach 18.5 per cent next year. The bailout creditors predict an economic contraction of 2.3 per cent this year after a drop of 3.2 per cent in 2012. However, he successfully lowered the deficit from 10.1 per cent in 2010.
Gaspar said he first asked to be released from government duties more than eight months ago. He said he wanted to leave after the constitutional Court, in July last year, blocked some of his planned reductions in expenditure, saying cuts to pensions and vacation bonuses for government workers were unlawful.
He said he stayed on because the prime minister asked him to oversee amendments to the 2013 state budget resulting from the court ruling.
Now that is concluded, and Portugal's finances are in better shape, he said, his resignation can no longer be postponed.