What it means
Decided only at the very last moment, with the outcome uncertain until the final second. The wire was the thread once stretched across the finish line at horse races, and a race that went down to it was one settled right there at the end. Pure nail-biting tension.
Usage examples
"Negotiations went down to the wire, they only shook hands two minutes before the midnight deadline."
"The negotiations went down to the wire, signed two minutes before the deadline."
"It was down to the wire, the result decided by the very last point."
"Mate, that match went down to the wire, one more ball and we'd have lost it."
"The deal went down to the wire and they sent the final email at 11:59."
Where it comes from
It comes from horse racing in the US. A wire used to be stretched across the finish line so officials could spot the exact winner. If a race went down to the wire, it stayed undecided till the very last instant. After that, the phrase broke out of the track and into everyday English.