"'In that day the glory of Jacob will fade; the fat of his body will waste away. It will be as when a reaper gathers the standing grain and harvests the grain with his arm - as when a man gleans heads of grain in the Valley of Rephaim. Yet some gleanings will remain, as when an olive tree is beaten, leaving two or three olives on the topmost branches, four or five on the fruitful boughs,' declares the Lord, the God of Israel." NIV translation
Now, the judgement turns to Israel as God describes the coming hard times. A body stores up fat during the good times in preparation for hard times and God says that Jacob (Israel) is headed for lean times. But, there would be a remnant left as described by the gleanings left in the field and the olives left on the tree.
Olives were harvested by beating the trees with a stick to knock the fruit off. There would be some olives on the higher branches that would not be knocked off. Throughout the Bible, the olive tree is a symbol of spiritual richness and these "olives" that were left would be those who did not turn to idolatry.
We see the same type of reference in Revelation 11 in regard to the two witnesses in the last days. These two, along with the 144,000, will be the modern equivalent of the Maccabees of the Old Testament times. They will hold fast to their faith in Jesus Christ during the period known as the Great Tribulation.