Who are the ancestors of Abiather, the High Priest that shared the office with Zadok before being exiled by Solomon? Can he be traced to Aaron? Was he related to Zadok?
Aviatar (or Abiather) was descended from Eli the prophet who was also a Kohen Gadol before him.
The lineage from the book of Shmuel is: Eli->Pinchas->Achituv->Achimelech->Aviatar.
Do not confuse the fact that there is also an Achituv in the line down to Tzadok (book of Ezra that traces his lineage as well as
Chronicles 5:30 - Eleazar begot Phinehas, Phinehas begot Abishua; 31 and Abishua begot Bukki, and Bukki begot Uzzi; 32 and Uzzi begot Zerahiah, and Zerahiah begot Meraioth; 33 Meraioth begot Amariah(I), and Amariah(I) begot Ahitub(I); 34 and Ahitub(I) begot Zadok(I) and Zadok(I) begot Ahimaaz; 35 and Ahimaaz begot Azariah(I), and Azariah(I) begot Johanan; 36 and Johanan begot Azariah (II)—he it is that executed the priest’s office in the house that Solomon built in Jerusalem—: 37 and Azariah(II) begot Amariah(II), and Amariah(II) begot Ahitub(II); 38 and Ahitub(II) begot Zadok(II),
The text seems rather strange as there are 4 generations between Zadok (I) and Azariah (II) that is the one claimed to have executed the office in the Temple. And then there are 3 more generations to Zadok (II). And is the text here to indicate that the first Azariah (2 generations before) did not execute the Priest's office (Kohen Gadol)
Chronicles (I) chapter 24 describes how the Kohen Gadol role was shared for a period between the sons of Elazar and the sons of Ithamar. And also that Ahimelech and others were clearly from the line of Ithamar:
I Chronicles Chapter 24 1 And the courses of the sons of Aaron were these. The sons of Aaron: Nadab and Abihu, Eleazar and Ithamar. 2 But Nadab and Abihu died before their father, and had no children; therefore Eleazar and Ithamar executed the priest’s office. 3 And David with Zadok of the sons of Eleazar, and Ahimelech of the sons of Ithamar, divided them according to their ordering in their service. 4 And there were more chief men found of the sons of Eleazar than of the sons of Ithamar; and thus were they divided: of the sons of Eleazar there were sixteen, heads of fathers’houses; and of the sons of Ithamar, according to their fathers’houses, eight. 5 Thus were they divided by lot, one sort with another; for they were princes of the sanctuary and princes of God, both of the sons of Eleazar, and of the sons of Ithamar. 6 And Shemaiah the son of Nethanel the scribe, who was of the Levites, wrote them in the presence of the king, and the princes, and Zadok the priest, and Ahimelech the son of Abiathar, and the heads of the fathers’houses of the priests and of the Levites: one father’s house being taken for Eleazar, and proportionately for Ithamar
Ahimelech there is listed as a son of Aviatar, not his father, and we know Aviatar had a son called Jonathan but may have also had a son called Ahimelech.
Of course being Kohanim they were both descended from Aharon. Eli was actually descended from Aharon's 4th son Ithamar (Chronicles). The line of Eliezer / Pinchas became unworthy after a period and therefore the title of Kohen Gadol which isn't guaranteed to be passed from father to son.
In the book of Shmuel, there is a curse placed on Eli and all his descendents, and bad things start to happen to them, including the destruction of the whole town of Nov, from which Aviatar is the only survivor.
In the book of Kings when Solomon sends Aviatar back to his home town there is a pasuk that tells how the curse of Eli was now fulfilled.
Note that the lineage from Pinchas (ben Elazar) down to Ezra might not be complete, i.e. he may have missed out some of the names in between. I read in a commentary that there were some gaps at the point where the less worthy Kohanim were.