Economically speaking, a price ceiling is never a good idea. Price ceilings always lead to shortages of the good in question.
When a price ceiling is put in place, consumers want more of the good. The price is lowered for them and therefore they want more of it. At the same time, however, suppliers will want to produce and sell less of the good. They will not be getting as much profit from selling the product and therefore they will not be as interested in selling it.
So, a price ceiling leads to an increase in the quantity demanded and a decrease in the quantity supplied. This causes shortages. For that reason, a government should not impose a price ceiling on gasoline.