There are several ways to go about proving that God has knowledge. (Place a footnote here about the other ways of proving this; perhaps explain why you are using this one) The argument St. Thomas gives in the Summa Theologiae is from God's immateriality. He starts by stating a difference between intelligent and non-intelligent beings, one that was stated earlier in this essay. "We must note that intelligent beings are distinguished from non-intelligent beings in that the latter possess only their own form; whereas the intelligent being is naturally adapted to have also the form of some other thing." This is similar to what was stated earlier about sensation when it was said that a sense organ receives a sensible form in a way other than the way matter receives forms. The eye remains what it is while it receives the form of and sees what is other than it. This is only possible by some kind of immaterial having, since matter is only capable of possessing one form at a time. As matter is limited to only possessing one form, the more removed from matter something is, the greater is its ability to have many forms. For example, it was above stated that the intellect is able to abstract from what is received from the senses and hold universal truth. This abstraction is from the material conditions of the here and the now, and this is possible because the intellect is itself not constricted by a bodily organ. Since God is in no way confined by matter, he is most free of all, and therefore most a knower.
[Question: why aren't angels all knowing if they are wholly immaterial? I probably don't need to address that here, but I should have some idea, just in case.]
After establishing that God is a knower, an argument must be given for what he knows. Knowing occurs whenever a knower is united with what is to be known. For example, the senses must be joined (through a medium) to some sensible object in order to actually sense, and intellect actually knows when it is joined to an intelligible form. God is himself both intellect and intelligible at once, always one and therefore always knowing and known. (This is begging to be expanded, but move on.) God is the chief object of his own knowledge, and through this knowledge he knows all that he knows. Since God is the same with his power, and by this power he is capable of bringing forth all that exists and can exist, so he also knows all of those things which can be effects of his power.
[Next post: God's power. Is prime matter in it?]