That means something that comes very close, but misses. For example, if you shoot a gun at a target and come only one centimeter from hitting it, you have a "near miss." You missed it, but you were very near it.
Your sentence is saying, "There is nothing better for a relationship than something that almost ends it, but that it is strong enough to survive." Relationships, like swords, can only be forged in fire. Another confusing proverb for you. :)