Lower gasoline prices slowed inflation in June, though many household costs remained stubbornly high.