Near in this case is used as a adverb meaning ‘ Just about; almost; nearly’
We often use damn to emphasize a statement,
Ie., I am damn sure this is correct.
Damn sure means very very sure,
The story is damn funny
Damn funny means very very funny.
So taken together damn near means very nearly, very almost. very near the point of something that will change something.
Hope this can help you . Thanks