Below is a 72-month chart from GasBuddy.com illustrating the price of gasoline per gallon and the price of crude oil per barrel (WTI, albeit Brent has a greater impact on U.S. gasoline).
Nevertheless, for a brief history lesson, oil sold from OPEC (the Organization of the Petroleum Exporting Countries) has been priced exclusively in U.S. dollars since 1974 when the U.S. Government (under then U.S. Secretary of State Henry Kissinger) and the royal family of Saudia Arabia (the largest oil producer in OPEC) formed an agreement/partnership in which Saudi Arabia agreed to price all of their oil sales in U.S. dollars and to then invest their surplus oil proceeds into U.S. Treasury securities. This is often referred to as petrodollars (see illustration below from an article titled “The Rise of the Petrodollar System: Dollars for Oil” at the Financial Sense blog).
For buyers of OPEC oil, they must first obtain dollars in order to buy the oil – a significant concern for developing nations and ones that have a meaningfully weaker currency. One consequence is that these nations often need to take on debt to obtain dollars and then are at the mercy of external forces (currency markets; global fractional reserve banking; etc.).