This prophecy is set in the time subsequent to the seven years of tribulation when Lord Jesus returns from Heaven to set up His millennial Kingdom on the Earth, at the beginning of His reign. One of the first things He does is to judge the behavior of the Gentile nations as political and geographical identities as to how they dealt with His brethren, the remnant Jewish bloc tasked with conversion of Gentiles in the absence of Himself and His Church Bride snatched away, during the Tribulation.
The context is the eschatology of Matthew 24-25, and has no bearing on the issue of personal works, faith, or salvation.
I could be wrong but I don`t believe a word of it.