Why it works
Notice who opened the d-file: Black did, with 4...exd3, and White's 5.Bxd3 quietly took up residence on it. 5...Nf6?? develops against the g5-knight and leaves the d8-queen standing at the end of that file with one defender — the king. 6.Nxf7! Kxf7 removes it, and now the only thing between Qd1 and Qd8 is White's own bishop: 7.Bg6+!! clears d3 with check, the king has no reply that saves both itself and the queen, and 8.Qxd8 ends the discussion. A clearance sacrifice where the tempo, not the material, is the point.
Refutation
5...Nd7! develops the other knight first — and plugs the d-file in passing, so the whole Nxf7/Bg6+ machine has no current (engine +0.6 for Black: the d3-gambit was optimistic). One move later ...Ngf6 comes safely. In lines where you have captured towards your opponent's development, always ask which of your pieces now lives on a freshly opened file.