Rationing is needed to curb the cost of imports and subsidies.
Despite being Opec's number two crude producer, Iran lacks refinery capacity and imports more than 40% of the 60 to 70 million litres of petrol it burns each day.
European and Asian petrol traders closely watch Iran for any fluctuations in demand.
Heavily subsidised petrol sells for as little as nine cents a litre, adding to the congestion and pollution in Iran's biggest cities. Subsidies are a strain on state coffers.
In a session broadcast live on state radio, 120 parliamentarians voted for the motion to pave the way for rationing in the year to March 2007 and 59 voted against.
Hamidreza Haji-Babaee, the parliament's deputy speaker, said: "The government will be allowed to ... impose petrol rationing if it finds that necessary and design an appropriate price for any extra consumption above the ration."
Iran's government was also obliged by the bill to improve public transport before imposing rationing.
Iran's conservative government draws its support from among the poor who regard cheap and plentiful petrol as a national right making the imposition of rationing a tough political decision.