The Germany substitute controlled Andre Schurrle’s cross with his chest before volleying in with seven minutes left.
Both sides wasted chances in normal time, Argentina’s Gonzalo Higuain and Lionel Messi both dragging wide.
Benedikt Howedes hit the Argentine post with a header late in the first half, but Gotze sparked German celebrations.