A warning that one is getting angered at you and will hit you in the head. A threat to physically hit with a hard blow to the head. ‘Block’ in this case refers to the head so to knock it off is to give you such a strong blow as to makeĀ your head come off your neck. (Compare to Knock the living daylights out of.)
Knock one’s block off
DEFINITION