“Abiathar.” The name “Abiathar” is questioned because in the record in 1 Samuel 21:1-9, Ahimelech is the priest. Although many commentators simply assume Mark made a mistake, we believe the Word of God is “God-breathed” (2 Tim. 3:16), and that “Abiathar” is not a mistake. There are several ways this apparent contradiction might be solved. One of them is that both men may have been referred to by both names. That would be one good explanation why 1 Samuel 22:20 refers to Abiathar as the son of Ahimelech, but 2 Samuel 8:17; 1 Chronicles 18:16 and 24:6 refer to Ahimelech as the son of Abiathar. It was quite common for someone to be referred to by different names. But it also has been suggested that Abiathar had a son named Ahimelech who was a priest, and that could explain the Old Testament verses that seem to switch the names.
Another solution, frankly, a more likely one, is that both Ahimelech and Abiathar were present when David came. It is even possible that due to Ahimelech’s age Abiathar had started to take on the duties of the priesthood and Mark recognized him for that. That would be similar to the position of Annas and Caiaphas at the time of the ministry of Christ. Annas was the elder and still called High Priest, but Caiaphas was the man actually running the priesthood and he is also called High Priest. But even if that was not the case, we know it was common for priestly families to live together, just like Eli did with his sons (cp. 1 Sam. 2:12ff), and the city of Nob had at least 85 priests (1 Sam. 22:17). When Doeg the Edomite killed 85 priests, Ahimelech was killed and Abiathar escaped and went to David (1 Sam. 22:20), and became High Priest under David. This could be why Mark says that David entered the house of God “in the days of Abiathar” (KJV; NIV), or “in the time of Abiathar” (ESV; NASB). Since Abiathar would have taken over the priesthood de facto as soon as his father died, David did in fact enter the house of God “in the days of Abiathar,” the well-known High Priest under David.