The war with Iran has driven up gas prices at a time when affordability is high on people’s minds.