All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Firstly, it should be noted that revealed texts (of Quran and Sunnah) can never be contradictory with one another; what sometimes seems to be contradictory thereof is the result of our poor understanding of the texts. We should first question our understanding before hastening to deny the revealed texts; committing thereby a grave prohibition.
The Ahaadeeth which indicate that the Prophet, sallallaahu ‘alayhi wa sallam, died from the effect of poison in the food that a Jewish woman served him are authentic and narrated in Saheeh Al-Bukhari, Saheeh Muslim, and other Hadeeth books. For instance, there is the Hadeeth to which you referred in the question. It is reported by Anas and cited in Saheeh Muslim. Moreover, ‘Aa’ishah narrated another Hadeeth to that effect that was presented in Saheeh Al-Bukhari.
Hence, there is no room for claiming that such reports are unauthentic. Furthermore, such reports do not contradict the fact that Allaah would have never given the Jewish woman the power to harm the Prophet, sallallaahu ‘alayhi wa sallam. Scholars have explained the meaning of that remark. Ibn Muflih wrote, “The meaning of the verse that reads (what means): {…And Allaah will protect you from the people…} [Quran 5:67] is that Allaah protected the Prophet, sallallaahu ‘alayhi wa sallam, from being subject to people’s oppression, control, or power; this never happened. The intended meaning is that Allaah protected the Prophet, sallallaahu ‘alayhi wa sallam, from that which none other than him was protected. For instance, Jaabir reported, “While the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, was sleeping, a Bedouin came to him, and took his sword stealthily. The Prophet, sallallaahu ‘alayhi wa sallam, woke up while the Bedouin was standing by his head, holding his unsheathed sword. He challenged him and said, 'Who will save you from me?' The Prophet, sallallaahu ‘alayhi wa sallam, replied: 'Allaah!' So he, sheathed it (i.e. the sword) and sat down. The Messenger of Allaah, sallallaahu ‘alayhi wa sallam, did not punish him.” This is why some of the Companions who ate from the poisoned meat died from the effect of poison. The Jewish woman meant that if he, sallallaahu ‘alayhi wa sallam, was not a true Prophet of Allaah, he would die from the effect of the poison. In fact, he, sallallaahu ‘alayhi wa sallam, lived normally for years after eating from that poisoned food. This Jewish woman did not kill him the way she wanted as she did with those who died immediately after eating the poisoned food. Allaah honored His Prophet, sallallaahu ‘alayhi wa sallam, as usual and did not cause him to die from the effect of that poison immediately. Instead, he died of its effect after years so as to attain the refined status of martyrdom. In fact, there is no contradiction between the religious texts in this regard. In fact, to reconciliate between them by understanding them in the context of one another is better.” [Al-Aadaab Ash-Shar‘iyyah]
Hence, the Hadeeth means that this Jewish woman did not accomplish her objective of killing the Prophet, sallallaahu ‘alayhi wa sallam, immediately with that poison and that Allaah caused this poison to remain in the body of the Prophet, sallallaahu ‘alayhi wa sallam, for years until he, sallallaahu ‘alayhi wa sallam, died from its effect years after that incident so as to honor him with martyrdom. For further information, please refer to Fatwa 56186.
This explanation does not contradict the Jewish woman’s statement, ‘If you are a true prophet, then the poison would not harm you,’ since the immediate effect of poison is normally 'death'. Al-Haafith Ibn Hajar wrote, “The Jewish woman said, ‘If you were a true prophet, then the poison would not harm you,’ means that the poison would not harm him like it normally does …” [Fat-h Al-Baari]
The fever from which he, sallallaahu ‘alayhi wa sallam, suffered prior to his death was one of the effects of that poison. Ibn Rajab wrote, “He, sallallaahu ‘alayhi wa sallam, was in intense pain while on his deathbed that he, sallallaahu ‘alayhi wa sallam, fainted many times. People thought that he, sallallaahu ‘alayhi wa sallam, had pleurisy; so, they forced medicine through the side of his mouth. When he, sallallaahu ‘alayhi wa sallam, regained his consciousness, he rebuked them and said: “Verily, Allaah would have never afflicted me with pleurisy. My pain is caused by the food of Khaybar (i.e. of the Jewish woman who was from Khaybar).”” He, sallallaahu ‘alayhi wa sallam, stated that the pain that he was suffering during his death was due to the poisoned meat of the goat offered to him by the Jewish woman. He, sallallaahu ‘alayhi wa sallam, used to experience pain from the effect of the poison from time to time. At the time of his death, he said: ‘I still feel the painful effect of that food I ate at Khaybar, and this is the time when my aorta is being cut because of its poison.’ Ibn Mas‘ood and others believed that he, sallallaahu ‘alayhi wa sallam, died as a martyr from the effect of that poison.” [Lataa’if Al-Ma‘aarif]
For more benefit, please refer to Fatwa pardoned people who insulted him">197369.
Allaah Knows best.