Gap on Thursday beat Wall Street’s quarterly revenue expectations, but gave a cautious outlook for the holiday season.