Raymond van Barneveld staged a superb fightback to reach the quarter-finals of the German Darts Championship with a 6-2 win over Adrian Lewis.