U.S. inflation accelerated last month as gas prices spiked in the wake of renewed fighting in the Middle East, underscoring the affordability challenges that are top of mind for many voters as midterm elections near. The Labor Department said Friday…