Much has been made of Europe's reliance on Russian oil and gas in recent years. However, I take it Europe was not buying that much oil or gas from the USSR during the Cold War. What resources was Europe relying on during that time, and how did it become so reliant on Russian resources in such a short time after the Cold War?
"However, I take it Europe was not buying that much oil or gas from the USSR during the Cold War."
It was.
The Russian fossil fuel industry actually predates the Soviet period. The first hand-dug oil wells appeared around Baku in the 19th century, and by the 1870s there was a flurry of oil-drilling and the establishment of about 20 small refineries. By the mid 1880s, crude oil production had jumped from 600,000 barrels to 10.8 million barrels (about a third of US output), and about 200 oil refineries were operating there. There was a slump in production in the early 20th century from a lack of investment in new technology, and Russian exports to the world market fell from 31% of global exports in 1904 (with extraction levels at a daily rate similar to the US) to 9% in 1913.
The Soviet Union was slow in its first decades at revitalizing and expanding oil production and use. Efforts at first concentrated on the Baku oilfields during and after World War II, but soon extraction moved to exploit new finds in the Volga-Urals area - oil was first discovered in 1929, and by the Second World War some 2 million tons were produced annually, with large new deposits discovered in 1944 and finally brought online in 1955.
1955 to 1960 was a real breakthrough in Soviet oil production, with the total doubling in those five years. The USSR surpassed Venezuela to become the second biggest oil producer (after the US), and alone produced 75% of total oil production in the Middle East.
The Baku oil fields never regained their pre-war (1940) level of production, and even the Volga-Ural fields production levels began to fall after 1975 - by this time the Soviets put massive pressure on developing yet new oil fields in West Siberia to make up for the fall in the other fields production, and to press Soviet oil production yet further.
Oil and gas in Western Siberia was almost discovered by accident - Soviet authorities were on the verge of calling off exploration in these regions when a well experienced a blowout outside of Tyumen in 1953. Further fields were discovered by 1960, and a viable extraction industry was operating by 1968 (a massive turnaround compared to the two decades needed to bring the Volga Ural extraction industry online). Industrial use of natural gas was also put into plans by 1965, and by the end of the 1960s massive reserves of oil and gas were being extracted at West Siberian sites with high production rates. Soviet authorities hoped to increase oil and gas production fivefold between 1961 and 1980 (which was part of Khrushchev's plan to achieve full communism by that latter date). Production totals by 1980 were well short of the desired goals, but still hit 603.2 million tons of oil in 1980, making the USSR the world's largest oil producer.
The Soviet Union had issues with oil and gas use domestically in the last couple decades of its existence. These related to increasing issues with extraction, increasing costs associated the oil and gas industries, and massive inefficiencies (which were connected with the dirt-cheap subsidized prices of fossil fuels in the domestic economy). But since the question is about oil and gas exports, I'll turn back specifically to that topic.
Soviet oil exports suffered quite a bit from the effects of the First World War and Russian Civil War - 1918 saw about 2 million tons of exports, or about half of national production. In 1929 exports had risen to 3.9 milllion tons, and then 6.1 million tons by 1932. In World War II exports (understandably) ceased, both from domestic needs and the widespread destruction of oil industry infrastructure. In the immediate postwar years, oil exports were miniscule (.5 million to .9 million tons), and only just exceeded 10 million tons by 1956.
From this point, oil exports began to blast through the roof: 57 million tons in 1964, 111 million tons in 1970, 183 million tons in 1980, and 216 million tons in 1989. Exports as a total percentage of Soviet production went from 11% in 1954, to 25.3% in 1953, to 35.5% in 1989. From the mid-1950s, the Soviets were looking to export outside of the Eastern Bloc, in what Washington termed a "Soviet economic offensive" - the Soviets were aggressively looking for buyers wherever they could, to the point of scaling down their prices on the world market to be more competitive. By the late 1970s, natural gas was also climbing as an export item.
Soviet exports, however, were often run in a very wonky fashion. It was largely dictated by the needs of central planning, rather than taking advantage of the world market. Meaning: oil exports outside the Eastern Bloc were largely conducted in order to raise hard currency to purchase items needed according to the dictates of planners, especially by purchasing wheat and high tech industrial goods. It meant that (strangely, from a market perspective), the Soviets ignored their own production advantages and the fluctuations of the world markets. This rather infamously got out of hand with the big drop in world oil prices after 1986 - the Soviets should have sold less oil and substituted it with other exports, but instead because of increasingly uncompetitive exports in other industries was forced to rely ever more on increased oil exports at falling prices.
While Western Europe had a number of oil and gas sources besides the Soviets in the 1960s and 1970s, by the 1980s an increasing amount of oil and gas was being exported to Western Europe (to say nothing of Eastern Bloc countries) via Soviet-built pipelines. The process of building further pipelines and increasing exports would continue after the Soviet collapse into the 1990s and beyond, but the groundwork for the current system was already being laid (in the case of the pipes, quite literally laid) in the later years of the Cold War.
ETA I'm getting a lot of this from Sergei Ermolaev's "The Formation and Evolution of the Soviet Union’s Oil and Gas Dependence" from the Carnegie Endowment for Peace, available here.