Arturo Vidal put Bayern ahead but Hannover levelled through Charlison Benschop after Niclas Fullkrug had missed a penalty.
Jupp Heynckes' side did not regain their lead until Kingsley Coman struck with 67 minutes played, before a late Robert Lewandowski penalty made the points safe.
Bayern host PSG in their final Champions League group game next week looking to avenge a 3-0 defeat in France, but Boateng fears they will suffer a similar fate if they do not improve upon the display against Hannover.
"We did not defend very well after losing possession and gave Hannover a lot of space, especially in the first half," said the centre-back.
"In the second half, we had a better organisation but, if you play like this against Paris, they will destroy you."
Bayern must win 4-0 at the Allianz Arena to leapfrog PSG and finish top of Group B.