Han here refers to 漢(or 汉 in simplified Chinese).
The concept of the country "China" was formed through gradual integration. Qin(秦) Dynasty unified the six kingdoms, but it was too short and only existed for ~15 years. After that, Han Dynasty was established and inherited many traditions of the Qin dynasty and carried it forward. Han Dynasty became a famous Dynasty in Chinese history and China's territory was determined at this time.
Han(漢) and Tang(唐) are often referred together as the most powerful and influential dynasties in Chinese history.
Due to the strong influence of Han and Tang at that time, their culture and characters were exported to Japan and Korea, therefore they just started calling these characters as (han character)漢字 since then.
Chinese languages have not been truly unified since ancient times. There are still various dialects. But overall we all call the modern Han language(現代漢語) as Chinese(中文/中國語). There is still difference between Han and Chinese. For instance, the Han(漢) culture had integrated into Japanese/Korean culture a long time ago, but the "China" nowadays to them is a different nation. So you wouldn't hear Japanese people calling the Chinese characters in their language 中國字 but only Kanji(漢字), because they are totally different now. Japanese also still refers the Classical Chinese(文言文) as 漢文
Taiwan and Hong Kong still use traditional Chinese characters, but you can still see some differences in characters when comparing with the Japanese Kanji(漢字) because most of the Japanese Kanji have retained the same writing since they were exported from Tang Dynasty to Japan, or perhaps evolved locally in their own ways.
Some of the details above I took the information from here and translated to English, but feel free to have a read if interested.