Sensex Gains Over 500 Points