Gap will lay off more than 500 employees in its latest round of layoffs as the apparel retailer looks to cut costs and get back to profitability.