"During our meeting a deal was struck to stage the races through 2009 and this gives a major boost to our motor racing tradition," ANSA news agency quoted Imola's mayor Massimo Marcignoli as saying after the meeting in London.
The circuit near Bologna has been the home of the San Marino Grand Prix since 1981 but is in need of refurbishment. Monza hosts the Italian Grand Prix.
Many thought this year's race, at a track named after Ferrari founder Enzo and his late son Dino, was a farewell after Ecclestone said it would be axed to make way for new races outside Europe.
New circuits in Bahrain and China made their debuts this year and Turkey is due to come in next season.
However the draft 2005 calendar, drawn up by Ecclestone and due to be finalised next month, had an unprecedented 19 races and listed Imola as provisional for April 24, subject to contractual issues being resolved.
"I've always been optimistic and after the last meeting a couple of months ago with Ecclestone I was confident about Imola's future," said Federico Bendinelli, president of the Sagis group that operates the circuit.
"There has been no official signing but the agreement, while verbal, has the same validity as a written one.
"We are committed to carrying out certain improvements to the circuit, even if we did not go into details," he added.