An overwhelming majority of MEPs voted in favour of a political compromise reached on the Regulation on Security of Gas Supply in June.
The new rules seek to give the EU the capacity to respond to gas supply disruptions and step up the development of interconnections.
They require member states to establish preventive action and emergency plans and grant the European Commission a strong role in coordinating emergency responses. The EU executive will also scrutinise the prevention plans with a view to ensuring that they do not endanger another member state's security of supply.
The agreement also seeks to correct the lack of interconnections, which was identified as having greatly contributed to the difficulties in getting supplies to Eastern Europe, where gas was largely cut off during the January 2009 Russia-Ukraine gas row.
EU countries will have four years to get their gas networks up to a standard where they can meet gas needs on days of "exceptionally high demand" - which statistically occur once every 20 years - even when their biggest source of gas or a major section of the network fails. Moreover, they will have to put in place reverse flow technology in all cross-border interconnections within three years.
Most EU member states have already started risk assessments and put in place the infrastructure required to safeguard gas supplies, the Commission said.
The regulation also seeks to shield European consumers from the impact of supply disruptions. It obliges gas companies to guarantee supplies to householders for at least 30 days during periods of exceptionally high demand or in the event of infrastructure disruption under normal winter conditions.