A price ceiling would create a shortage of gasoline, as you correctly explained. If prices were free to adjust, they would increase, you are right. However, since there is a price ceiling, prices would not be able to increase.
What do you think would happen in such a situation?