The “wire” is the finish line. The first person to cross the finish line is the winner.
Example: “The race was really close, it came down to the wire.”