Popularized by a video of a radio broadcast at a college. A guy was asked at the last moment to fill-in for the normal sportscaster. He was given a poorly written script that did not match any part of the replay video, yet he stuck it out. The segment was so ridiculously fubared he ended with, "and boom goes the dynamite."
Refers to being involved in a situation where everything that can go wrong, does, yet sticking it out until, inevitably, the dynamite goes off (which itself is a reference to movies where, no matter what, the bomb goes off.)
The absolute finest example of "Boom goes the dynamite" is BP's approach to trying to stop the crude oil being pumped into the Gulf of Mexico.