It's as though you've been shot or stabbed in the neck, which is bad!
It could mean that you're going to have to pay a lot of money. "If wait until too late to buy your airline tickets, then you're going to take it in the neck."
Or it could mean any bad thing is going to happen to you. "If you quit school, you'll take it in the neck from your parents."
It's very informal. Another way to say it is: It's going to be bad for you, or it's going to cost a lot.