Suppose in mathematics, someone writes a paper, uploads it to arxiv and afterwards he learns that the proof technique used in the paper has some similarity with some discussions in a math forum (e.g. math exchange / stack exchange). It was not published in any journal or in arxiv. He did not see this discussion while working on the paper. What should the author do? In general, in mathematics the priority goes to the one who publishes the article first in arxiv.
It's just an independent discovery. That it was on the web versus a journal is just a detail (could have even be neither, like from a verbal talk). Although the informal nature of the other work does make it a little more understandable that you missed it when you did a background search (even so, obscure archived articles can be missed also).
I wouldn't feel some need to update the arxive paper. These things happen all the time.
If you do an update of the arxive (which I see more as a preprint server, but this is a different debate), into an archived real journal, I would cite the other work at that time. I personally think it is possible to gently note that the other work was noticed after your discovery. (Buffy disagrees--too personal. But I think you can adroitly manage it.)
Depending on how important the similarity is (i.e., which results of the paper are affected, how similar it is, how detailed the other proof is, etc.), I would either do nothing, or post an update to the arXiv paper. The update could add to the related work or intro some discussion of this other work. If it's so similar that the reader wouldn't understand why you wrote the results again, you could say something like "After writing up and posting the present work, it has come to our attention that...".
Also, to have links between the relevant material, I would probably post a comment or such on the other source, to point to the arXiv preprint. Indeed, it may be relevant to the people who were involved in that discussion, or to other people who would stumble upon it.