Chez Isaac clipped past keeper Dean Snedker from Michael Cheek's pass for Braintree's opener on 29 minutes.
Harriers levelled on 49 minutes when Luke Maxwell crashed in off the bar.
But, when Snedker headed clear on 61 minutes, Paine lobbed the ball back over his head from 45 yards to seal three points for the hosts.
Harriers remain 10 points adrift of safety after their third straight defeat, with 10 matches to go, heading into this weekend's trip to fellow strugglers Torquay.
The Gulls are now five points above them following former Harriers striker Nathan Blissett's two goals in their 2-1 win at Macclesfield.
Harriers boss Colin Gordon told BBC Hereford & Worcester:
"It's an unbelievable goal to concede. I suppose it's karma for them for what Guiseley did to them on Saturday.
"But I was very proud with the way we played on a terrible pitch. We've had all the credit in the world from their manager and their players, which is great.
"People will say 'Yeah well, you've lost again', but it's not about now. We can't half-do these things. We are 100% behind playing the game the right way and I guarantee that we will succeed.
"Braintree are on a very good run but we came here and scared them to death. Our performance was every bit as good as in the games we've won."
Braintree midfielder Matt Paine's spectacular strike earned victory over Kidderminster Harriers to lift his side into the National League's top five.