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 1848, American English, on the image of pulling the wires that work a puppet.