Goetze scored in the 65th minute, when the outstanding Shinji Kagawa flicked the ball toward him and over the unsighted Jerome Boateng, allowing the 19-year-old playmaker to prod it past Manuel Neuer from 10 meters.
Bayern winger Arjen Robben had little effect in only his third league start.
Mario Gomez had a penalty appeal waved away in the 86th, and another striker, Nils Peterson, was blocked out for a corner two minutes later.
Franck Ribery went agonizingly close to equalizing in injury time, but desperate defending kept Bayern at bay.
Short link: