We Indians at times are obsessed with gold as we consider it to be a status symbol as well as auspicious. It's important for us to understand that gold is not an essential commodity - you cannot eat gold.
If the gold price goes beyond a certain affordability point people will simply stop buying it reducing it's demand which will further reduce the gold price. Looking at the currency economic condition gold is not going to get un-affordable any time soon but demand will certainly fall if the gold price increases in future.
Though gold is considered to be a safe investment but it has not always been the case and there had been exceptions in the past. In 2008 gold price was reduce to 70% of it value, so a net loss of 30% whoever purchased gold at that point of time. If we move further back in the 1980s gold price was reduced to 35% of its value in 2 years (65% loss in gold price). So there's no reason why it cannot happen again.
Your investment profile has to be balanced (e.g. gold, silver, mutual funds, fix deposits, insurance policies, real estate, etc) and should not completely rely on gold which normally happens with Indian middle class due to lack of investment knowledge.
Also we tend to invest in gold jewellery which is a wrong thing to do as an investment. Investment in gold has to be in gold coins or gold bars purchased from a known bullion trader and store it in bank lockers or in gold ETFs or gold bonds.
Click here to know why not to invest in gold jewellery as investment.