These two verses both explain the sign of the beginning of the gathering—the coming forth of the Book of Mormon.
“These works and the works which shall be wrought among you” refer to the record of the Messiah’s appearance to the Nephites, which will be revealed to the Gentiles and then “come forth from the Gentiles” to the Nephites’ descendants.
While a popular LDS understanding is that the Nephites were eventually annihilated, the Book of Mormon differentiates between the Nephite government/culture and the Nephite “seed.” However, these descendants “shall dwindle in unbelief.” When Nephi1 prophesied the future of his people, he also declared that his people’s descendants would continue until after the Book of Mormon’s coming forth (1 Ne. 22:8–12, 2 Ne. 26:15–20; see also commentary accompanying 3 Nephi 21:3). At that point, they would be mingled with the Lamanites.
In verse 6, the Savior parenthetically explains why the Book of Mormon will go to the Gentiles. They will have the opportunity to understand the gospel and be adopted into the house of Israel. He has already made this point (3 Ne. 16:12–13, 20:27).