Old English wir "metal drawn out into a fine thread," from Proto-Germanic *wira- (source also of Old Norse viravirka "filigree work," Swedish vira "to twist," Old High German wiara "fine gold work"), from PIE root *wei- "to turn, twist, plait."
A wire as marking the finish line of a racecourse is attested from 1883; hence the figurative down to the wire. Wire-puller in the political sense is by 1842, American English, on the image of pulling the wires that work a puppet; the image itself in politics is older:
The ministerial majority being thus reduced to five in a house of five hundred and eighty-three, Lord John Russell and Lord Melbourne respectively announce the breaking up of the administration, and the curtain falls on the first act of the political farce, to the infinite annoyance and surprise of the prime wire-puller in the puppet-show. [British and Foreign Review, vol. IX, July-October 1839]