Problem: Jesus says that at the time David ate the consecrated bread, Abiathar was high priest. Yet 1 Samuel 21:1–6 mentions that the high priest at that time was Ahimelech.
Solution: First Samuel is correct in stating that the high priest was Ahimelech. On the other hand neither was Jesus wrong. When we take a closer look at Christ’s words we notice that He used the phrase “in the days of Abiathar” (v. 26) which does not necessarily imply that Abiathar was high priest at the time David ate the bread. After David met Ahimelech and ate the bread, King Saul had Ahimelech killed (1 Sam. 22:17–19). Abiathar escaped and went to David (v. 20) and later took the place of the high priest. So even though Abiathar was made high priest after David ate the bread, it is still correct to speak in this manner. After all, Abiathar was alive when David did this, and soon following he became the high priest after his father’s death. Thus, it was during the time of Abiathar, but not during his tenure in office.
“How he went into the house of God in the days of Abiathar the high priest, and did eat the shewbread, which is not lawful to eat but for the priests, and gave also to them which were with him? (Mark 2:26)”