After the disposition of the land and the sea he proceeds to the disposition of heaven under which air is contained. He lingers a little longer on this because of the many marvelous things which appear there. First, he considers the disposition of the light and the darkness which embraces the whole of the higher body in common. Consider that the heavenly bodies act through their own light on lower bodies. This is so because light is like the active quality of the heavenly bodies, like cold and heat of the elements. Therefore, he connects the effects of the heavenly bodies on those lower things... with the consideration of light and darkness. Among the other effects of the heavenly bodies on lower bodies, the most common is generation and corruption, and from this he begins saying, "Have the gates of death opened to you?" For death is the corruption of a living body, and so it properly belongs to the man to whom the present discourse is addressed. But the gates of death are the causes of corruption in relation to the powers of the heavenly bodies, which are the primary powers through which one proceeds to such an effect. It is very difficult to know the period of life and the permanence of each thing, and so the gates of death are not open to us because we cannot know in the heavenly bodies the proper cause of the corruption of each thing. Darkness fittingly describes death both because in death man (who experiences knowledge by means of light) is deprived of corporeal sight, and also because man after death passes into oblivion as into a kind of darkness. Therefore he says, "and have you seen the dark gates?" He may be understood to be calling "the dark gates" because it is proper to death which before he had called the gates of death. Or "dark gates" can be referred to another action of the heavenly bodies, which is the darkness of the atmosphere, so that what he said about the gates of death is referred to only living bodies, but what he said about the dark gates may refer to transparent bodies.
Source: Commentary on Job