The cost at the pump made its biggest monthly percentage increase in decades amid lingering tensions over the war in Iran.