When writing the paper about completed experiments, should you cite work you hadn't read before?
An important realization I had while writing the first few papers of my career is that a paper/thesis/any kind of publication should not be a recollection of your path through this research. You will have made many experiments as part of the research that need not actually appear in the paper because they're not important for what you're trying to show.

Instead, a publication is a way for you to explain insights you have gained during this research. In which order you came to these insights, in which you read other papers, or in which you did experiments is -- generally -- not important for the telling of the story. 

So, regarding the original question whether one should cite a paper one hadn't read before the research started: it can't be answered with yes/no. Whether a paper should be cited (as asked in the title) has nothing to do with when one read the paper. It has everything to do with whether you think it's a useful reference for readers to have. In the body of the question, there is a variant: whether it's "legitimate", and there the answer clearly is "yes". In particular, we add references to papers all the time that were pointed out by reviewers -- long after the research was concluded for the most part.