The biggest gasoline price decline since January offset a sharp, drought-caused rise in food prices as inflation at the wholesale level rose a moderate 0.4 percent in September, the government said Friday. Food prices skyrocketed 1.2 percent - three times the August rate - and served notice to consumers that the effects of the summer drought have not yet played themselves out. Countering the food rise was a 3.3 percent drop in energy prices, which reflected declines for all major fuels. Gasoline prices, up 3.8 percent in August, fell 3.3 percent last month; natural gas prices fell 2.5 percent; and home heating oil costs were down 4.6 percent. The 0.4 percent September increase represented a moderation from the 0.6 percent advance in August. The September gain translates to an annual wholesale rate of 4.5 percent. For the first nine months of 1988, wholesale prices rose at an annual rate of 4.3 percent, nearly double last year's 2.2 percent gain. Many private economists believe that Americans will benefit from the world oil glut and say that, for all of 1988, inflation will average around 3.4 percent.