An automatic response to something.
From the tendency of the knee to jerk involuntarily when hit sharply, properly called the patellar reflex. That was recorded by Sir Michael Foster in his Text-book of physiology, 1877:
"Striking the tendon below the patella gives rise to a sudden extension of the leg, known as the knee-jerk."
The term began to be used figuratively from the early 20th century onwards. O. O. McIntyre, in his New York Day-By-Day column in The Coshocton Tribune, October 1921, wrote this:
"Itinerant preacher stemming Broadway on a soap box. And gets only an occasional knee-jerk."