When Erasmus started to compile his Greek Testament in 1515, he relied primarily on three manuscripts. He had a 12th century manuscript for the Gospels, and another 12th century manuscript for Acts and the Epistles. He had a third 12th century manuscript for Revelation, although it had lost the last six verses (the last leaf of the codex). In other words, the best manuscripts he had to work with had been copied a millennium after Jesus lived.
Erasmus compared the first two manuscripts with a few others (the oldest being a 10th century minuscule that he rarely used) for his text from Matthew through Jude. He used the third manuscript for Revelation; but for the last six verses, he translated from Latin back into Greek. This was the first edition of his Greek text, published in 1516. Erasmus did a second edition in 1519 to clean up hundreds of typographical errors, and this edition was used by Luther and William Tyndale in their German and English translations respectively. This edition did not include the Comma Johanneum (1 John 5:7b–8a). Erasmus published a third edition in 1522 that did include the Comma Johanneum, and this edition was in all reality the basis for the KJV. Erasmus also did a fourth (1527) and fifth (1535) edition.
Stephanus (the Latin version of his Parisian name, Estienne) published four editions of the Greek text. His first two (1546, 1549) were basically corrections of Erasmus’ work based on the Complutensian Polyglot. His third edition (1550) depended more on Erasmus’ fourth and fifth editions and was the first to list variants. This was the Greek text used for the Geneva Bible, and for all practical purposes became the standard Greek text. Stephanus’ fourth edition (1551) added verse references.
Theodore Beza published at least nine editions all quite similar to Stephanus’ fourth edition. The 1588–1589 and the 1598 editions were heavily used by the KJV translators, but in reality the Greek goes through Stephanus back to Erasmus’ third edition.
The Elzevirs (uncle and nephew, 1624) used Beza’s 1565 edition, and in their second edition (1633) included an advertising blurb, “Textum ergo habes, nunc ab omnibus receptor.” — “The text you have is now received by all,” hence the name Textus Receptus, the TR. They meant that this text is now viewed as the standard Greek text.
So why are there missing verses? When Stephanus’ added verse references in his fourth edition (1551), he added them to the TR, which had the seventeen verses since they had already been added to the text. When the verses were dropped out of our critical Greek text we use today, the verse references went away as well. The NIV, actually, keep the verse reference in the text in a square bracket, and a note that the verse is not in our best manuscripts (or something to that effect).