This paper studies the effect of gasoline price shocks on food prices. We use data on the prices of aggregate and disaggregate food products to estimate a partially identified structural vector autoregressive model using Bayesian methods. We found that a positive gasoline price shock leads to a significant increase in the aggregate food price along with the prices of disaggregated retail food items. Furthermore, we found that higher gasoline prices trigger a significant increase in the price of fertilizers and animal feed leading to an increase in the cost of producing food products. Our results, however, suggest that higher gasoline prices do not significantly increase the food marketing cost. Finally, we conduct a historical counterfactual analysis and find that higher gasoline prices contributed to the increase in the aggregate food price as well as the prices of cereals and dairy products during the 2005–2007 period and following the onset of the Russia–Ukraine conflict.