The next big revolution after internet in the global information industry is Internet of Things. RFID technology which is short for Radio Frequency IDentification, plays a crucial role in IoT proliferation. The unique characteristic of RFID as an identification sensor (connecting non-computing things to internet) is the major driving force behind the huge popularity of IoT. While there has been considerable progress in adopting RFID, a strong understanding of the fundamentals required for innovation is missing. To draw advantage from the wide-spread acceptance of RFID technology, it will become important to have a complete review of all its components. This article analyses the literature from World War II to the present and is, as far as our knowledge goes the first survey focusing on RFID system for enabling IoT. Other surveys do exist that, rather than analyzing the technology being designed to enable IoT with sensing and actuating devices focus on security and privacy issues, or on the other end discuss the applications of RFID systems. In this survey, we make an exhaustive review of RFID technology working towards connecting all the physical devices to the internet. We commence the discussion with a historical perspective, evolution, RFID frequencies and subsequently, we make an in-depth survey of underlying components encompassing tags, readers and middleware. For alleviating the increased perception of threats, we make a detailed review of security and privacy issues and present the preliminary outcomes of extensive research carried to mitigate them. Short tutorial descriptions are provided as and when the demand arose. Compared to other survey papers in this field, our objective is to provide a more thorough summary of RFID fundamentals to enable researchers and application developers to get upto speed quickly on how the different components fit together to deliver desired functionalities in IoT without having to go through complex details of RFID systems (RFCs and standard specifications). Finally, we highlight lessons learned in making RFID more adaptive to IoT solutions and conclude with research challenges yet to be addressed in order to fully exploit the potential offered by connected and cognitive things.