Under the plan, Turkey agrees to tackle people-smugglers and take measures to keep more of the millions of refugees fleeing the Syrian conflict from crossing by sea to Europe.
The deal came after European Commission officials visited Turkey on Thursday in a last-ditch effort to persuade the government to sign up to the plan, following a visit by President Recep Tayyip Erdogan to Brussels last week.
Turkish officials presented their EU counterparts with a "wish list" during the talks in Ankara on Thursday, which European Commission President Jean-Claude Juncker later talked the leaders through at their summit in Brussels.
The demands included €3 billion in new aid - three times the amount the EU has up until now offered - easing visa restrictions, opening new chapters in Turkey's long-stalled accession negotiations for EU membership, being included on the list of "safe countries" for asylum and to have more Turkey-EU summits, an EU source said.
Juncker told AFP that there was no concrete amount of money in the final deal and the figures would have to be negotiated.
But Chancellor Angela Merkel confirmed that "the €3 billion sum played a role."
Merkel heads to Ankara on Sunday for further talks on the refugee crisis.
'Sharing the burden'
"We need direction and we need organisation - and we need predictability - and that means sharing the burden, and most of all that we don't concede sovereignty over the seas to the smugglers," Merkel said after the talks.
European Council President Donald Tusk said the deal was a "major step forward" but added that "an agreement with Turkey only makes sense if it effectively contains the flow of refugees."
Turkey is the main departure point for the more than 600,000 migrants who have entered Europe this year, most of them making the short but dangerous sea crossing to the Greek islands, but some also coming by land.
During the talks news broke that a Bulgarian border guard had shot and killed a refugee on the Turkish border.
The death, believed to be the first of its kind during the crisis, forced Bulgaria's premier to fly home from the Brussels summit.
The refugee crisis has already claimed the lives of more than 3,000 people this year who have drowned while making the dangerous crossing of the Mediterranean as they flee conflict and repression in the Middle East and elsewhere.
No visas, no deal
Juncker added that Turkey would not get a free ride when it came to the easing of visa rules, and there would be a clear link between its commitments to helping manage the migrant crisis and progress on its EU membership.
"We have agreed with our Turkish partners that the visa liberalization process will be accelerated but this does not mean that we will step away from the basic criteria," he said.
Turkish Prime Minister Ahmet Davutoglu had stressed there would be no agreement without a visa deal.
"We will not sign a re-admission deal before we obtain progress on the question of Schengen visas (to the EU's passport-free area) and an easing of conditions for visas for Turkish citizens," Davutoglu told Turkish TGRT television in an interview.
French President Francois Hollande said there had to be "clear rules" on what Turkey could expect, playing down Ankara's demands for the easing of visa rules.
The 28-nation European Union has been left more divided than ever by the migration crisis, especially given fears the Schengen zone could collapse as countries try to curb the huge numbers of migrants criss-crossing the continent.
Hungary's Prime Minister Viktor Orban, who has already faced criticism for his hardline stance towards migrants, announced Thursday his country had completed construction of a fence along its southern border with Croatia to stem the massive daily influx.
Croatia said more than 4,800 people had entered on Wednesday, bringing the overall number of arrivals in the EU member state to nearly 175,000.