39 But the voice of God, our instruction in true wisdom, speaks what is perfect, and expresses the absolute truth, when it teaches that itself is prior not merely to things of time, but even to things infinite. For when the heaven was being prepared, it was present with God. Is the preparation of the heaven an act of God within time; so that an impulse of thought suddenly surprised His mind, as though it had been previously dull and inert, and after the fashion of men He sought for materials and instruments for fashioning the heaven?
Nay, the prophet's conception of the working of God is far different, when He says, By the word of the Lord were the heavens established, and all their power by the breath of His mouth. Yet the heavens needed the command of God, that they might be established; for their arrangement and excellence in this firm unshaken constitution, which they display, did not arise from the blending and commingling of some kind of matter, but from the breath of the mouth of God. What then does it mean, that Wisdom begotten of God was present with Him, when He was preparing the heaven?
For neither does the creation of heaven consist in a preparation of material, nor does it consist with the nature of God to linger over preliminary thoughts concerning His work. For everything, which there is in created things, was always with God: for although these things in respect of their creation have a beginning, nevertheless they have no beginning in respect of the knowledge and power of God. And here the prophet is our witness, saying, O God, Who hast made all things which shall be. For although things future, in so far as they are to be created, are still to be made, yet to God, with Whom there is nothing new or sudden in creation, they have already been made; since there is a dispensation of times for their creation, and in the prescient working of the divine power they have already been made.
Here, therefore, Wisdom, in teaching that it was born before the ages, teaches that it is not merely prior to things which have been created, but is even co-eternal with what is eternal, to wit, with the preparation of the heaven, and the setting apart of the abode of God. For this abode was not set apart at the time when it was actually made, for setting apart and fashioning an abode are different things. Nor again was the heaven formed at the time when it was (ideally) prepared, for Wisdom was with God both when He prepared and when He set apart the heaven.
And afterwards it was fashioning the heaven by the side of God Who formed it: it proves its eternity by its presence with Him as He prepares; it reveals its functions, when it fashions by the side of God Who forms. Therefore, in the passage before us it said that it was begotten even before the earth and mountains and hills, because it meant to teach that it was present at the preparation of the heaven; in order that it might show that, even when the heaven was being prepared, this work was already finished in the counsel of God, for to Him there is nothing new.
Source: On the Trinity (New Advent)