The "fiscal compact" aims to prevent the 17 eurozone states running up huge debts like those which sparked the Greek, Irish and Portuguese bailouts.
To take effect, the pact must be ratified by 12 eurozone states.
UK Prime Minister David Cameron, who with the Czechs refused to sign, said the summit had accepted his ideas for cutting red tape and boosting growth.
On Thursday he had complained that his ideas, contained in a joint letter signed by 12 EU leaders, were being ignored.
But after the talks he said "our letter really did become the agenda for this meeting... We now have a plan that we must stick to in the months ahead".
The newly re-appointed President of the European Council, Herman Van Rompuy, said the British proposals were being taken seriously and he had sought to redraft the summit's conclusions accordingly.
Critics argue that the fiscal pact is mainly a political gesture aimed at reassuring taxpayers in Germany, the eurozone's dominant economy, where there is reluctance to pay for further eurozone bailouts.
German Chancellor Angela Merkel described it as a "great leap", a first step towards stability and political union.
The pact emerged at an EU summit in December, where Mr Cameron vetoed plans to change the EU treaties to enforce greater budgetary discipline.
These new powers may face an early test as both Spain and the Netherlands have admitted they will miss targets for reducing their deficits, BBC Europe editor Gavin Hewitt reports.
While there has been a change of emphasis at this summit, "from crisis mode to growth mode" in the words of one senior official, it will be difficult to achieve whilst tough spending cuts are being made, Gavin Hewitt adds.
Whereas in the past even France and Germany broke the EU's deficit rules the new treaty is aimed at preventing such practices.
Eurozone countries will scrutinise each other's budgets and the European Court of Justice will be able to check whether nations stick to the rules. It will fine them up to 0.1% of national GDP if they fail to do so.
'Credibility at stake'
In a speech at the signing ceremony, Mr Van Rompuy said: "This stronger self-constraint by each and every one of you as regards debts and deficits is important in itself.
"It helps prevent a repetition of the sovereign debt crisis. It will thus also reinforce trust among member states, which is politically important as well.
"The restoration of confidence in the future of the eurozone will lead to economic growth and jobs. This is our ultimate objective."
Speaking shortly after signing the pact, the President of the European Commission, Jose Manuel Barroso, said it was a strong political statement for the EU.
"In the eyes of the world what is at stake is the very credibility of the euro area and of Europe as a whole," he said.
The pact, he said, enhanced the euro's permanence "contrary to all the negative prophecies".
Spain wants to negotiate a higher deficit target with the EU, but Brussels made no concessions at this summit.
Spain says its 2012 deficit will reach 5.8% of gross domestic product (GDP) - well over the 4.4% target agreed with the European Commission.
The Dutch deficit is forecast to rise to 4.5%, up from an earlier forecast of 4.1%.
The fiscal compact will now go before national parliaments and, in the case of the Irish Republic, a referendum.
Ireland rejected the Lisbon Treaty in a referendum in 2008, before approving it a year later after obtaining EU concessions, but the success of this fiscal treaty is unlikely to depend on Irish voters.
Irish businessman Declan Ganley, a leading "No" campaigner in 2008, has said he may support the fiscal compact if Brussels offers Dublin better terms in bailing out its banks.
The chances of a "Yes" vote were around 50-50, he was quoted as saying by Reuters news agency.
While the compact only needs to be ratified by 12 of the eurozone states to take effect, any state which fails to back it will lose the right to future bailouts.
An international bailout worth about 85bn euros ($113bn; £72bn) was granted to Dublin in November 2010.