One of the foremost scholars on the ancient manuscripts of the New Testament is Bruce Metzger (1914-2007). Metzger says that earliest and most reliable manuscripts have added the words "and fasting." He hypothesizes that the origin of this addition to the text was an emphasis in the early church on the necessity of fasting.
Regarding the other verse you cited (Matthew 17:21), the entire verse is in question (not just a couple of words). Metzger thinks that the scribes probably added Matthew 17:21 to the text of Matthew 17 in order to assimilate with Mark 9:29 (which evidently was added before Matthew 17:21).
The King James Version (KJV) was produced in the early 1600s. These later translations (such as ESV, NIV, NASB, etc.) were produced after earlier and more reliable manuscripts were found. (Notice that another modern translation, the HCSB, has "and fasting" in brackets.) In these situations (in which better manuscripts seem to indicate differences in well-known verses), these modern translators usually add a footnote to explain why there are differences in words, verses or occasionally entire passages when compared with an older translation such as the KJV (such as the end of Mark or the story of the woman taken in adultery in John).
One of the things I love about the Bible and Christianity is its commitment to the truth. Unlike how the skeptics and detractors characterize Christianity, there is no "cover-up." Everything is in the light and on the table in these modern translations (in this case in the footnotes).
Metzger, B. M., & United Bible Societies. (1994). A Textual Commentary on the Greek New Testament, Second Edition. London; New York: United Bible Societies.