The world-wide energy crisis was brought home to the citizens of Eastern Europe today with the publication of a Hungarian news agency photograph showing a family of frustrated Polish vacationers pushing their car in the direction of the Romanian-Hungarian border.

"Without Dollars - You Push" was the headline given to the picture by a Belgrade evening newspaper. The story behind the picture lies in controversial new regulations announced by Romania last week under which foreign tourists are obliged to pay for their gasoline in advance - and in Western currency.

The Romanian restrictions, which sparked off a full-scale row within the Warsaw Pact countries, are perhaps the best illustration yet that gasoline shortages are far from being solely a capitalist phenomenon.

Only last month the Soviet news agency Tass, in a commentary on the latest OPEC price increases, said triumphantly: "It can be said in the most definite way that the energy crisis in the West...has not affected the Soviet Union and other socialist countries."

This complacency has been shattered by what for Eastern Europe has been a week of extraordinary development. First thousands of East European tourists, unable to buy gasoline without Western currency, were stranded in Romania. This led to well-publicized diplomatic protests from Romania's Soviet Bloc allies - a rare event.

Following the protests, Romania has temporarily suspended its ban to allow East European tourists still in the country to get home. But this has not solved the problem for the rest of the estimated 2.5 million tourists from socialist countries who visit Romania every year - either for a holiday or in transit to Bulgaria. From Aug. 10, they will again have to pay for Romanian gasoline in Western currency.

Romania's explanation for its drastic measures is that, unlike other Soviet Bloc countries, it imports no oil from the Soviet Union. Instead it makes up its shortfall by paying precious hard currency for imports from the Middle East.

If Romania has to pay dollars for its gasoline, Bucharest argues, so too should foreign tourists visiting Romania - whether they come from East or West. East European currencies, including the Romanian lei, are not convertible on the world money markets.

Romania's reluctance to accept the political conditions likely to be attached to the purchase of Soviet oil has increased its exposure to the worldwide energy crisis. But Soviet oil reserves are themselves dwindling, and the remarkable fact about the last few months is that all East European countries have been obliged to introduce some sort of energy restrictions, however loyal they may be to the Kremlin.

The price of gasoline has been increased by 30 to 100 percent throughout the Soviet Bloc this year, but ironically the toughest restrictions of all have been imposed by Bulgaria, the Soviet Union's closest ally. In Bulgaria, the price of gasoline now stands at $4.25 per gallon, street lighting is banned after 11 p.m., and the sale of heating fuel for private apartments is rationed.

In addition, strict measures have been introduced to curb the widespread practice of drivers' siphoning fuel out of official vehicles for use in private ones. A special dye is to be added to the gasoline used for government vehicles. To prevent officials drivers claiming to have driven farther than they have, any vehicle without properly functioning mileage indicators is to be considered unroadworthy.

Here in Yugoslavia, which like Romania gets its oil supplies from the Middle East, a plan has been introduced that is designed to keep private cars off the roads for six days every month.

Long lines of motorists were reported this week at Romanian borders, some cooking meals on camping equipment intended for use at Black Sea resorts or in the mountains.

Westerners waiting in line were frequently approached by Soviet Bloc motorists seeking to change enough money into dollars to buy the minimum 1 litres (2 1/2 gallons) worth of coupons to be allowed into Romania. Those unable to produce $8 or the equivalent were turned away - and Yugoslav border guards reported an 80 percent drop in transit traffic.

A Hungarian tourist waiting in line at his country's border with Romania despite government warnings not to go there was quoted as saying: "We heard the announcement on the radio but could not believe that Romania would bring such a strange regulation into immediate effect."

Tourists leaving Romania were allowed only enough gas to reach the next garage - any more was siphoned out of their tanks by Romanian customs officials.

To ease travelers' difficulties and make it possible for them to avoid passing through Romania, Czechoslovakia announced that its citizens could travel to Bulgaria through Yugoslavia without having to obtain the usual exit visa. The decision marked a major concession since Yugoslavia ranks for travel purposes as a Western country for the Soviet bloc.

The East German Communist newspaper Neues Deutschland said many tourists in Bulgaria and Romania were cutting short their vacations. But it praised Hungary for allowing East Germans to buy more than the usual limit of Hungarian currency and for setting up special campsites for stranded vacationers.