Best Answer - Chosen by Voting
"It came so close to never happening." is correct.
Even though I'm english I can't work out why we would say that though. I think it's because "close to" expects a noun after it - for example, "we were close to the edge". So you have to make a noun out of the "happen" verb (this is called the gerund or verbal noun). To do this you add "ing" to the verb, hence "happening".
Hope that helps ^^