An inflation gauge closely monitored by the Federal Reserve accelerated last month, showing that prices remain elevated less than a week before midterm elections in which the uncomfortably high cost of living for millions of Americans has become a central issue.