NEW YORK — The nationwide average price for a gallon of gasoline has hit $5 for the first time ever.