R. Hanina was the scion of a family of great sages. He was a bachelor all his life, and together with his brother sold shoes for prostitutes, and yet they did not raise their eyes to see them. Amora Rava used to say that on these two brothers it is said that if a bachelor who lives in a city and does not sin, God declares him every day.
R. Yochanan bar Nafcha wanted to ordain him a Rabbi but failed, until R. Hanina explained to him that he is a descendant of the house of Eli the priest, on whom upon a curse was uttered: " and there shall not be an elder in thy house for ever". A curse that is aimed in its biblical sense, "an elder" - a Rabbi - a descendent of Eli.
One must not confuse between him and Hanina bar Hama, who is sometimes cited simply as R. Hanina, and was ordained a Rabbi (most likely by Judah ha-Nasi).