Why pipped?
I guess that the post is to do with horse racing - as in the post was the finish line? I could be totally wrong there.
Here are the relevant entries in Eric Partridge, A Dictionary of Slang and Unconventional English, eighth edition (1984):
beaten at the post. 'Men going on leave would get down to Boulogne [or Calais] and even across the channel when word would come that all leave had been cancelled and that they were to return to units.' (Patch, 1966): coll and s., resp.: WWI. Prompted by racing's beaten, or pipped, at the post. Not, by the way, unheard in WW2. See also pipped on (or at) the post.
and:
pipped on (or at) the post, be. To fail or be circumvented after having been within reach of success or victory or one's goal: sporting (ca. . 1892 > , by 1920, gen. (Daily Telegraph, 16 Apr. 1937.) Also occ. pipped on the tape, as in P. G. Wodehouse, Ukridge, 1924. Ex pip, v., 4. ["To beat, defeat, e.g. in a race: 1891 (OED)."]
Partridge suggests that pip definition 4 comes from senses 1 and 2 of the same word. Specifically, sense 1 of pip is
To blackball: clubs': 1880 (Huth's Buckle). Prob. suggested by pill v., 1 ["To reject by ballot: 1855, Thackeray, 'He was coming on for election ... and was as nearly pilled as any man I ever knew in my life.'].
And sense 2 of pip is
To take a trick from (an opponent): cards: from ca. 1885.
The earliest matches for each of the four allied phrases in a Google Books search covering the years 1860 through 1960 do indeed relate to horse racing. From "Hamburg Up, Ornament Down," in Turf, Field and Farm] (September 17, 1897):
When the 14 youngsters were marshaled in front of the grand stand and sent to the post all eyes rested upon them and whispers of eager expectancy were heard. Patience was tried when minutes went by and there was no flash of the flag. Sailor Prince unseated his jockey and ran away, and this was exasperating to thousands who did not want to see a good colt beaten at the post.
In this instance, the "post" is evidently the starting post for the race; but according to Merriam-Webster's Eleventh Collegiate Dictionary post may refer either to the starting point or the finishing point of a race, so "beaten at the post" seems to be an inherently ambiguous phrase—capable of meaning either "beaten before the race begins" or "beaten at the very end of the race."
From "Our Van," in Bailey's Magazine of Sports & Pastimes (June 1903):
In a Maiden Two-Year-Old race we saw a race thrown away. In Newsboy one was found to beat Bass Rock, but Lane, having accomplished this, took matters too easily, and was "pipped" on the post by Extradition. When will jockeys learn?
Here the pipping seems to have occurred at the finish line, due to a too-leisurely ride to the finish by the frontrunner.
From P.G. Wodehouse, He Rather Enjoyed It [aka Ukridge] (1925) [combined snippets]:
"I won't kiss their infernal babies!"
"You will, old horse, unless you mean to spend the rest of your life cursing yourself vainly when it is too late that poor old Boko got pipped on the tape purely on account of your poltroonery. Consider, old man! Have some vision! Be an altruist! It may be that your efforts will prove the deciding factor in this desperately close-run race."
"What do you mean, desperately close-run race? You said in your wire that it was a walk-over for Boko."
"That was just to fool the telegraph-bloke, whom I suspect of being in the enemy camp. As a matter of fact, between ourselves, it's touch and go. A trifle either way will do the business now."
Wodehouse uses the extended metaphor of a horse race throughout this stretch of dialogue.
From Alfred Brown, The Ordinary Man's India (1927) [combined snippets]:
But it is nothing to the pandemonium which is let loose as the tapes are released, and through your glasses you see "the field" start from the six- furlong post. The noise increases as the horses approach. The first enclosure now throws away its assumed air of calm, women shriek and faint, while strong men mop their brows and swear as the favourite is pipped at the post and a rank outsider wins. Violent argument is hushed into low groans as the numbers go up ; then almost everyone leaves his seat and treks earthwards. By the time the ground is reached the jockeys have weighed in, the "All right" cone has been hoisted, and the bell which signals the "tote" to open for the next race is loudly ringing.
Here again, as in "Our Van," the pipping is an end-of-race occurrence.
Pill(v.1) To pillage, rob (OED1)
. It fits quite nicely with the feeling of we was robbed suggesting that you were winning and then lost the game/race right at the very end.
Pipped came from the name for the black ball.
[It] was called a pip - after the pip of a fruit, in turn from earlier similar words which meant the fruit itself, eg pippin, and the Greek, pepe for melon - so pipped became another way or saying blackballed or defeated.
I remember as a teenager in the '80s hearing the expression used literally at Cheltenham Races meaning (as far as I recall) a horse came from behind to win by a nose at the finishing post. I interpret "pipped" to mean it happened quickly and only by a small margin at the end of the race.
"Pipped": Could it be shorthand for getting "Wally Pipped". Wally Pipp was the first baseman who supposedly wanted a day off for a headache on June 2, 1925. He was replaced by Lou Gehrig in the lineup that day. Gehrig went on to became the regular first baseman and played 2,130 consecutive games for the Yankees. So "Pipped" was to be replaced or beaten out to a position. The only mentions I see using "pipped" were after 1925. It looks like it was added to the phrase "to the post" later.