In most devout Catholic families, the prayer of blessing before meals is ubiquitous. "Bless us, O Lord, and these Thy gifts, which we are about to receive from Thy bounty, through Christ our Lord. Amen." In some particularly pious households, the blessings after meals is also said regularly. "We give Thee thanks, Almighty God, for these and all Thy benefits, who livest and reignest for ever and ever. Amen." We say these blessings, of course, in order to acknowledge that all our blessings, even the barest material necessities, come to us from God's goodness. Because of this provision, thanksgiving is the appropriate disposition of a creature to his loving Creator. The aspect of thanksgiving is well understood. But there is another reason, no less important but much less understood.
Besides the rendering of thanks, the blessing over food has been understood since ancient times as a sort of exorcism. In Patristic thought, the entire world is under the power of the evil one unless and until it is brought under the kingship of Christ by the triumph of the Gospel and the destruction or abandonment of the pagan idols. This idea comes from the data of the New Testament itself: Satan is the "prince of this world" (John 14:30; 16;11); he is the "god of this world" (2. Cor. 4:4), the "prince of the power of the air" (Eph. 2:2) and under whose sway are all the unregenerate kingdoms of the world (1 John 5:19). When mankind fell, creation also fell, and man abdicated his government over creation to Satan, who rules everywhere men are ignorant of the Gospel.
This means that not only must men be redeemed and re-purposed for Christ, but so must creation itself. This is why, in the traditional rite of baptism, the salt and water must both be exorcised before they can be blessed and used in the sacrament:
O salt, creature of God, I exorcise you by the living God, by the true God, by the holy God, by the God who ordered you to be poured into the water by Eliseus the Prophet so that its life-giving powers might be restored. I exorcise you so that you may become a means of salvation for believers, that you may bring health of soul and body to all who make use of you, and that you may put to flight and drive away from the places where you are sprinkled every apparition, villainy, and turn of devilish deceit, and every unclean spirit, adjured by Him Who will come to judge the living and the dead and the world by fire. Amen.
The blessing of water also claims the use of that element for God's kingdom:
O water, creature of God, I exorcise you in the name of God the Father almighty, and in the name of Jesus Christ His Son, our Lord, and in the power of the Holy Spirit. I exorcise you so that you may put to flight all the power of the Enemy, and be able to root out and supplant that Enemy with his apostate angels: through the power of our Lord Jesus Christ, Who will come to judge the living and the dead and the world by fire. Amen.
The use of such exorcisms presupposes that these elements are under the sway of the evil one prior to the rite, or at least that they could be. The same holds true for any element of the world, including our food. Porphyry, the most learned of all the pagan philosophers, says that demons like to attach themselves to the dwellings of men, particularly our food. He writes:
"Every house also is full of them, and on this account, when they are going to call down the gods, they purify the house first, and cast these demons out. Our bodies also are full of them, for they especially delight in certain kinds of food. So when we are eating they approach and sit close to our body; and this is the reason of the purifications, not chiefly on account of the gods, but in order that these evil demons may depart." 
If even a pagan was able to comprehend this basic spiritual truth, how much more ought those called by the name of Christ? St. Gregory the Great, relating the story of a holy abbot St. Equitius, tells of a demonic possession that occurred when a nun ate a head of lettuce that had a demon attached to it:
"In the monastery of the abbot Equitius, it happened that a religious, going one day into the garden, saw a lettuce which excited her appetite. She took it, and forgetting to make the Sign of the Cross, ate it with avidity. At the same instant, she was possessed by the Demon and thrown upon the Earth, a prey to the most frightful convulsions. The venerable abbot hastened to put himself in prayer, begging relief for the unfortunate religious. Soon the Demon, tormented in his turn, began to cry out: 'What have I done? What have I done? I was on the lettuce; she did not banish me from it, and she ate it.' In the name of Jesus Christ, the holy abbot commanded him to go out of the body of that servant of God, and never dare to molest her again. The Demon obeyed, and the religious was entirely cured." 
Because "the whole world is under the sway of the evil one" (1 John 5:19), things taken out of that world ought to be prayed over before being put to use. Thus, when we are praying over our food, we are not only rendering thanks to God, but also invoking His name that the demons may be put to flight, that the food of this world may be eaten to the glory of God and purified of any potential demonic influence. It is a minor exorcism, the reality of which lives on in the more formal exorcisms which have been preserved in the rites for the blessings of salt and water in the Sacrament of Baptism.
Note, this is a different argument and issue from St. Paul's famous comments about eating meat sacrificed to idols. When Paul says he sees nothing wrong with eating meat sacrificed to idols (cf. 1 Cor. 8), the context of the discussion is whether or not such conduct would scandalize a brother weak in the faith. St. Paul's point here is that, because Christ has redeemed the world, the things of the world can be used rightfully without fear of giving honor to the demons to whom they were originally consecrated, as in the case of meat sacrificed to idols. But we may be assured that St. Paul would not eat such meat without first praying over it; in fact, it is praying over it which makes it acceptable. Paul himself teaches this when he admonished Timothy that any meat is acceptable for eating if it has been sanctified by prayer and the Word of God (1 Tim. 4:5). It is precisely because food can be sanctified by prayer that St. Paul can counsel us that it is alright to eat meat that has been sacrificed to idols.
Two other examples are furnished to us in the Life of St. Columba, the great Apostle of Scotland, penned by St. Adamnan. Take this story:
"At another time, a certain youth, named Columban, grandson of Brian, came forward hurriedly, and stopped at the door of the little cell in which the blessed man [Columba] was writing. This same person, being on his way home from the milking of the cows, and carrying on his back a vessel full of new milk, asked the saint to bless his burden, as he usually did. Then the saint, being at the time at some distance away in front of him, raised his hand, and formed the saving sign in the air, which at once was greatly agitated; the bar, which fastened the lid of the pail, being pushed back through the two openings that received it, was shot away to a great distance, while the lid fell to the earth, and the greater part of the milk was spilled upon the ground. The young lad then laid down the vessel, with the little milk that remained, on its bottom on the ground, and kneeled down in prayer. The saint said to him, "Rise up, Columban, for thou hast acted negligently in thy work today, inasmuch as thou didst not banish the demon that lurked in the bottom of the empty vessel by forming on it the sign of the cross of our Lord before the milk was poured into it; and now, as thou seest, being unable to bear the power of that sign, he has quickly fled in terror, troubled the whole vessel in every corner, and spilled the milk. Bring the vessel, then, nearer to me here that I may bless it." This being done, the half-empty pail, which the saint had blessed, was found the same instant, filled by divine agency; and the little that had previously remained in the bottom was at once increased under the blessing of his holy hand, so as to fill it to the brim. 
Therefore, when we pray before our meals, let us give thanks to God, and invoking His most powerful name, implore Him to put the demons to flight, that the food which the earth has yielded might be utilized to the glory of God and the demons put to flight.
 Eusebius, Praep. evang., Book IV:23
 St. Gregory the Great, Dialogues, Book I:4
 St. Adamnan, Life of St. Columba, Book II:15