Meaning:
A stimulus.
Origin:
This expression derives from the invigorating effect of injecting drugs. A shot is of course US slang for an injection, either of a narcotic or medicinal drug. That term has been in use since around the beginning of the 20th century; for example, this piece from the San Francisco Chronicle Supplement, October 1904:
"I varied hardly a minute each day in the time of taking my injection. My first shot was when I awoke in the morning."

'A shot in the arm' came soon afterwards and the first mention of a figurative use of it in print that I can find is from
the Maine newspaper The Lewiston Evening Journal, January 1916:
The vets can give politics a shot in the arm and the political leaders realize it.