First of all, please note that both the Spanish and the Inca had food production. It was not the existence of food production per se that gave the Spanish their advantage. Instead, it was the fact that the Spanish (and Eurasians in general) had had food production for longer and in more places than the Incas and other natives of the Americas had.
Eurasia was able to give rise to many civilizations because it had food production earlier and because food production could diffuse more easily. Because of this, the various civilizations could create technologies and could then trade them with one another. This allowed them to benefit from technologies that were devised by other civilizations. With many civilizations all creating and adapting technologies, and with them having done so for a much longer time, the Eurasians had technologies (steel weapons) that the Inca did not. One should also note that the longer history of food production meant that the Eurasians had various infectious diseases that the Inca did not.
Thus, the fact that Eurasia had food production for longer led to more civilizations, better technology, and more infectious diseases than the natives of America had.