This slang expression is used when someone is forced to do something they don't want to do, but have no choice in the matter.
She had me by the balls so I had to go along with her to see her mother.