The Internet of Things (IoT) has become one of the most widely utilized technologies in the recent decade, particularly in healthcare systems. With the usage of wearable and mobile devices, IoT-based healthcare systems have significantly increased the value of the healthcare sector, resulting in the effective use of health data exchange for enhanced, accurate, and quick diagnosis. These devices communicate, process, compute and monitor real-time scenarios via wireless or wired connections. Such devices are heterogeneous, having limited memory and computational power. The adoption of the IoT system in healthcare raises security and privacy concerns. Healthcare records containing sensitive patient data complicate this system since there is a danger of a privacy breach, privacy leakage, tampering, and so on. Blockchain technology has recently emerged as a promising solution to such breaches and problems. In this study, we consider various challenges to healthcare IoT implementation for widespread practical use, considering the security concerning the IoT layered architecture. We have categorized various layered security issues faced by IoT and specific attacks and security issues faced in communication, computation, and authentication IoT-based healthcare systems. Then we demonstrate how blockchain technology can be a key enabler in resolving numerous healthcare IoT security issues. We concluded that blockchain provides a secure and efficient way to resolve healthcare issues.