With the price of gasoline approaching $3 a gallon in many European countries, American travellers to the Continent are changing their train of thought.

"They're beginning to realize that, looking at dollar values, special rail plans for visitors are the lowest-cost transportation of any speed in Europe," said a spokesman for the Eurailpass Executive Committee head-quartered here.

Eurailpass is a prepaid ticket that permits the purchaser unlimited first-class travel on the rails of 15 Western European countries for a specified length of time. The cost for the 15-day first-class ticket is $190; 21-day, $230; a month, $280; two months, $390; and three months, $460. In addition, there's a second-class Eurail Youthpass available at$260 for those under 26; it's good for two months.

The passes must be purchased before departure for Europe from a travel agent or the offices of the French, German, Italian or Swiss railways.

The Eurailpass spokesman said that flying between European cities is one of the most expensive ways to go. Renting a car, especially if there are fewer than three passengers, also is very expensive. Regular first-class train travel is also not cheap; and long-distance bus travel, which is slower, is not always available.

A representative round-trip from Paris to Vienna for 15 days, he said, would cost $190 by Eurailpass, $229 by regular first-class train, and more than $600 by compact rental car, based on a two-week rental at unlimited mileage, but including the cost of gas, insurance and taxes.

Another cost-cutter for Eurailpass holders, he said, is free transportation from many of Europe's gateway airports to the center city after they arrive at their overseas destination. In recent years, more and more major airports have had rapid transit link-ups with the downtown areas, he pointed out.

Those on the Continent already functioning include Barcelona, Brussels, Dusseldorf, Frankfurt, Paris and Vienna. Due for completion by next year are linkups in Rome and Zurich. Amsterdam Airport also has finished the first link to Amsterdam-South in a rail connection that eventually will encompass Amsterdam, the airport, Leiden and The Hague. It's due to be completed by 1981.

The spokesman said Eurailpass holders wishing to take advantage of the service need only have their passes validated at the railway counter in the gateway airport or at the airport rail station. Other free or reduced-fare bonuses offered by Eurailpass include lake steamer and steamship transportation, ferry crossings and bus transportation.

The 15 countries in the eurailpass network include Austria, Belgium, Denmark, Finland, France, Germany, Greece, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden and Switzerland.

Through Eurailpass is a good deal for many American visitors to Europe, it's not a panacea for all. If you expect to spend most of your time touring one country, check to see if they have a special rail plan for visitors. If they do, you'll probably find it cheaper than Eurailpass and also much less than if you buy the rail tickets separately in that country. You can get the information from the national tourist office of the country you intend to visit or from your travel agent.

If you do intend to use the rails on your visits, Eurailpass notes, there are some things to be awate of:

Travel as lightly as possible. Your baggage is usually stored above your seat.

Don't worry about the language. Most stations have picture signs as well as information desks.

All European train stations have poster-size timetables keyed to European time (zero hour to 24:00 hours). Fast trains usually appear in red on the posters. Next to the time is the name and number of the train with its routing, plus the track and platform numbers. There are separate ticket windows at larger stations for domestic and international trains.

Reservations for a seat, sleeper or couchette can be made down to one hour in advance, and there is a charge - about $1.50. Reservations for a sleeper or couchette are absolutely required.

Don't get off the train to get snacks, etc., at stations. You might be left behind. Stops at stations are very brief.

There are usually no porters available at stations, so baggage is moved by luggage carts. It's usually not advisable to check your luggage across national boundaries. In stations, coin-operated luggage lockers are usually available.

Money can be changed at all railway stations. Look for the signs: "bureau de change" in France; "wechsel" in Germany; "cambio" in Italy.

On the newer trains, the cars usually have a central aisle with two seats on one side and one seat on the other. In the compartmented trains, there is an aisle down one side. The compartments in first class hold six passengers, sitting in threes across from each other. Second-class compartments hold eight passengers.

Being sure you're on the right train is assured by checking the signs at the head of each platform as well as the identifying tablet on each car. Remember that through-cars are switched on and off European trains, so be sure your destination is on your car's tablet, or ask a conductor.

You can get information, brochures, maps and timetables on Eurailpass by writing to : Trains, P.O. Box M, Staten Island, New York 10304.