Djokovic twice fought back from a breakdown in the first set and after dominating the tie-breaker he never looked back, winning 7-6 (7/1), 6-4, 6-3 as Federer, who needed a medical time-out, faded.
Never before has a final in London lasted so long - it went into the twelfth game of the fifth set and then into the tiebreak.
Federer, who has skipped the whole clay court season for the past two years, declared the triumph over the big-serving American in just 63 minutes was an ideal performance from which to launch a French Open bid.
Federer, who won the last of his Indian Wells titles two years ago but lost in 2018 final, used his backhand slice to keep Gojowczk from gaining any rhythm in the first set.
Sixth-seeded Marin Cilic of Croatia meets Roger Federer in Sunday's final of the 2018 Australian Open, with the Swiss aiming for his 20th grand slam title.
Tennis star Roger Federer announces his withdrawal from the Rio Olympic games due to a knee injury.
The last time the 17-time Grand Slam champion was absent from a Grand Slam was at the 1999 US Open.
Subscribe to our Youtube channel for all latest in-depth, on the ground reporting from around the world.
Copyright © 2020 TRT World.