I bought him a gift for our anniversary
Why was that?
Because I was sick of him treating me like crap.
It's nice to get gifts for your spouse, but this sounds like you are rewarding him for mistreating you.
He doesn't deserve to be treated well. I will spend my money on him when he starts treating me right.
I think I understand that you gave him a relatively cheap and modest gift as a way of telling him that he is treating you badly.  This is acceptable, but it might have been too subtle.  I think you need to be more direct, and tell your husband that his actions toward you are unacceptable.