Roger Federer produced another sublime comeback to defeat Tomas Berdych 3-6 6-4 6-3 and land his sixth Dubai title.