This is an interesting question. Hopefully it is an academic one and not from real life (though it sounds like what happens frequently in various human situations).
First, I would apologize for failing to do my task properly and ask what I could do to make up for that, and assure them that I would try harder in the future.
If I suspected that some kind of grievance was coming, I'd be very careful to document the situation, interactions, etc. I'd also ask other coworkers or managers if they would be willing to vouch for my work or character, if necessary, especially if they witnessed any of the interactions.
If the friction continues, it is likely something personal. I would meet with each person to see what we could do, if anything, to work it out. If that doesn't succeed, then a choice needs to be made since the manager is involved. If I really wanted to stay where I was, then I would attempt to circumvent the persons involved, and arrange a meeting with higher management or human resources. Be aware that this may backfire and make things worse, not better.
Otherwise, I'd probably look for a transfer to another area, or even leave the company, as there is no point spending your life in an unpleasant situation. Also, by preemptively seeking the move, I'd have more control over how it turns out, rather than just reacting to what happens to me.