The Dutchman scored with 40 seconds remaining, saving the Bundesliga leaders' blushes
Giovanni Federico stunned the visitors as he fired the 2. Bundesliga side into the lead on 26 minutes, and a lacklustre Bayern, despite utilising most of their first team - including Arjen Robben and Franck Ribery - from the start, were lacklustre in attack, and only equalised in the 52nd minute as Toni Kroos broke through and slotted home.
The fixture appeared destined for extra time, but with just seconds remaining, Robben decided the result as he fired home from the middle of the penalty box.
The hosts defended superbly in the first half, and Christoph Kramer had a free header saved before Mirkan Aydin made a good overlapping run and crossed low to Federico, who tapped in the opener.
Bayern responded positively as Robben had a header miss narrowly over the bar, but the Bavarians, with Ivica Olic as the lone front man, were unable to unlock their opponents' resolute defence.
At the break, Jupp Heynckes brought on Mario Gomez and David Alaba in attack-minded switches, and Ribery and Jerome Boateng came close in rapid succession shortly after the restart. The visitors finally broke through on 52 minutes as Gomez was involved in a lovely pair of one-twos that ended in him returning the ball to Kroos, who made no mistake when one-on-one with goalkeeper Andreas Luthe.
Bochum played to the very end and came close on one occasion as Daniel Ginczek forced a diving save from Manuel Neuer, but the Bavarians imposed themselves in the closing minutes as their hosts grew increasingly tired. Robben decided the game late; Ribery cut back a low cross to the Dutchman, who fired in his first goal since December 3.
The result sees Bochum crash out of the Pokal as Bayern advance to the quarter-finals, which will be held in February.