The 25-year-old Serb appeared to be heading for a routine win when he claimed the opening set 6-1.
However, his German opponent responded in the second set and forced a tie-breaker.
Qualifier Berrer claimed an early mini-break to take the lead, before keeping his composure to serve out for a 7-3 success.
Djokovic took control of the deciding set early thanks to a break of Berrer's serve. Another break of serve soon followed as the Serb wrapped up the match 6-2.