As a rarer (but older) masculine name it is probably derived from a surname: see Fay 1 or Fay 2.
Though the etymology is unrelated, this is the name of a mountain on the island of Crete where, according to Greek myth, the god Zeus was born.
As an English name, Zoe (sometimes with a diaeresis as Zoë) has only been in use since the 19th century. It has generally been more common among Eastern Christians (in various spellings).