GLD invests in physical gold and GDX invests in companies related to gold.
If market goes down then it will take majority of stocks down with it. More over investment in companies are subjected to other risks like mgmt quality, their competitiveness in the mkt etc..
With GLD, these risks are not there.
So, take you pick in terms of risk attached to these etfs. GLD = lower risk, but lower returns.
GDX = higher risk, but possible higher return as well (depending on mkt coniditions and the skill of fund manager in picking right companies).
Happy Gold investing.