The tree and the speaker's wrath are related in that they are both poisonous.
The speaker's implacable anger at his sworn enemy poisons him, eating away at him inside until, eventually, the foe dies after eating a poisoned apple from the speaker's tree. In that sense, the poisonous nature of the speaker's anger can be compared to that of the tree, which grows just like his wrath.
What is initially figurative language becomes literal. At first, the poisoned tree is a metaphor for the speaker's anger at his enemy. But by the time we've reached the third stanza, the poisoned tree is a real tree, a tree capable of bearing poisonous fruit. And on eating this poisonous fruit, the speaker's foe dies, much to the speaker's satisfaction.
This notable shift from figurative to literal language drives home the central point of the poem: that anger and hatred toward others, especially if bottled up, can have real-life consequences.