The Gentiles will have a time when they possess the Gospel. That should and can be a blessing to them. However, it can also be a curse, for “unto whomsoever much is given, of him shall be much required…” (Luke 12:48.) The Gospel carries responsibilities as well as blessings, and when the Gentiles reject that Gospel, the judgment will come upon them. That the judgment will come by the sword is a reference to the cleansing of the enemies of Israel by the Triumphant Messiah.
Reference: That the sword of justice should hang over the people is an image that has appeared before in the Book of Mormon (Alma 54:6; Alma 60;29). The ultimate reference, however, must be to the Sword of Damocles, that famous reference to a Greek story of a sword hanging by a thread over the king’s throne. This phrasing is most likely coming from Joseph’s cultural background rather than the plate text. Mesoamerican swords might have had points, but were typically slicing weapons. Hanging one would be the equivalent of hanging a club, and not nearly as dangerous as the pointed sword in the reference.