Tuna. It makes every cat go wild. The way to most animal's hearts are through their stomach. If you make a habit of giving him a little bit of tuna fish (from the can in water) now and then (ignore him the rest of the time unless he approaches you). He'll come around. A less smelly option are treats. Every day, give him one treat. Then ignore him unless HE shows you attention. Eventually you may notice him inching his way toward you, or you may wake up with him sleeping on your bed.
Animals don't forget easily and some hold grudges. It could be jealousy of another pet. It could be that you stepped on his tail on accident months ago and he doesn't trust you now. Or it could be that you annoy him because you're loud or use quick motions (animals have opinions too). He could also see you as a plaything. When I was little my cat saw me as a giant mouse that he would stalk. He would literally hide and then tackle me, scaring me half to death. When I grew older, it became my responsibility to feed him. He became the sweetest cat and would let me do practically anything besides rub his belly (he was ticklish). He was fully clawed too. Before that, I was only allowed to touch his head, anything else and the claws came out.