c. 1300 (early 13c. in surname Porkuiller), "flesh of a pig as food," from Old French porc "pig, swine, boar," and directly from Latin porcus "pig, tame swine," from PIE root *porko- "young pig." Also in Middle English "a swine, a hog" (c. 1400).
Pork barrel in the literal sense "barrel in which pork is kept" is from 1801, American English; the meaning "state's financial resources (available for distribution)" is attested from 1907 (in full, national pork barrel); it was noted as an expression of U.S. President President William Howard Taft:
"Now there is a proposition that we issue $500,000,000 or $1,000,000,000 of bonds for a waterway, and then that we just apportion part to the Mississippi and part to the Atlantic, a part to the Missouri and a part to the Ohio. I am opposed to it. I am opposed to it because it not only smells of the pork barrel, but it will be the pork barrel itself. Let every project stand on its bottom." [The Outlook, Nov. 6, 1909, quoting Taft]
The magazine article that includes the quote opens with:
We doubt whether any one knows how or when, or from what application of what story, the phrase "the National pork barrel" has come into use. If not a very elegant simile, it is at least an expressive one, and suggests a graphic picture of Congressmen eager for local advantage going, one after another, to the National pork barrel to take away their slices for home consumption.
Pork in this sense is attested from 1862 (compare figurative use of bacon). Pork chop "slice of meat from the ribs of a pork" is attested from 1858. Pork pie "pie made of pastry and minced pork" is from 1732; pork-pie hat (1855) originally described a woman's style popular c. 1855-65, but also worn by men. It was distinguished by a brim turned up around the low crown, a shape that resembled a deep pork pie.