What would happen if the world ran out of usable gasoline?

Just gasoline? The details of your question appear to assume an end to all petroleum based fuels.

Biofuels are a real solution. However at this stage of its early development, production is too inefficient/expensive and miniscule in volume compared to what has been pumped out of the ground. If you would allow for the supply of oil to dwindle over time, there is a chance that enough capital and investments can be brought to bear and ramp up production to sustain the most essential parts of the economy.

Though it doesn't directly address your question, I think you might be interested in a what if article that postulates a need to reboot civilization without fossil fuels.

/r/AskScienceDiscussion Thread