The new directive seeks to regulate products that look and taste like tobacco with the aim of discouraging young people from taking up smoking in the first place.
But disagreement over e-cigarettes threatened to derail the talks between the European Parliament and the EU Council of Ministers, concluded on Monday evening.
The compromise stipulates that e-cigarettes will be considered like regular tobacco products if they contain nicotine in a concentration of more than 20 mg/ml.
However, individual member states can regulate e-cigarettes as medicines, if they are presented as having curative or preventive properties.
Refillable e-cigarettes will not be banned, but member states can ban specific types of cartridges for e-cigarettes, if they can justify the ban by safety concerns.
Furthermore, if at least three member states adopt a ban on a specific cartridge, the European Commission will be able to impose an EU-wide ban unilaterally, without seeking approval by Parliament or the member states.
The new directive also includes a ban on 'flavoured' cigarettes, like those containing menthol, and requests manufacturers to display large health warnings - picture and text - covering 65% of the front and the back of packages.
The compromise still has to be approved by EU member states and the European Parliament.