Have Hope
I feel sorry for the situation you find yourself in. Before telling him his behaviour is unacceptable (which it is!), take a "time out" to consider all the reasons why he's behaving this way. Write them down, helps with the psychology.
In my experience, there could be any number of reasons or excuses. The easiest is that's his style. Did he get this job just in time before he was terminated in previous one. He inherited someone else's team. You're a threat to him because you're good at your job (he's jealous). He's got problems at home (marriage, children, elderly parents, obnoxious neighbours). All can contribute to how he behaves at work.
Whilst it doesn't excuse his behaviour, talking to him about it could go one of two ways, or maybe both. He acknowledges/apologises and possibly gives a reason. He can see no wrong in his actions. The final one is to make your life at work so difficult, you leave.
Behaviour can be attributed to age. Are you older than him? If you are, maybe you remind him of his mother. Don't laugh, it's true! A young graduate said a similar thing to me about being older. After stating there's nothing wrong with experience, I reminded him he was being discriminatory, he admitted his father had recently made a similar comment.