Traditional least squares estimates of the responsiveness of gasoline consumption to changes in gasoline prices are biased toward zero, given the endogeneity of gasoline prices. A seemingly natural solution to this problem is to instrument for gasoline prices using gasoline taxes, but this approach tends to yield implausibly large price elasticities. We demonstrate that anticipatory behavior provides an important explanation for this result. We provide evidence that gasoline buyers increase gasoline purchases before tax increases and delay gasoline purchases before tax decreases. This intertemporal substitution renders the tax instrument endogenous, invalidating conventional IV analysis. We show that including suitable leads and lags in the regression restores the validity of the IV estimator, resulting in much lower and more plausible elasticity estimates. Our analysis has implications more broadly for the IV analysis of markets in which buyers may store purchases for future consumption.