OPEC controls gas prices by either increasing or decreasing the amount of oil available. If the amount available goes down, the prices go up. This is the law of supply and demand. OPEC may choose to lower their available inventory by slowing down production or by putting more of the oil produced into reserves. To increase the amount of oil available, the members of OPEC would begin to produce more oil, or open up their reserves as inventory.
The purpose of OPEC is to try preventing any sudden, extreme changes in gas prices. If one country is not producing as much oil as normal, they have other countries pick up the slack to stabilize the market. They are responsible for keeping the gas prices from falling too low, normally trying to avoid prices of below $50 US Dollars a barrel.