There has been some fuss about the main ideas of Nietzsche's philosophy and Stirner's main work The Ego and Its Own even if Nietzsche usually attributes to Schopenhauer the main influence of his work.
Would it be too far to say that it was plagiarism? There are several similarities between Stirner and Nietzsche as philosophers, but are they enough to say it was actually plagiarism and not just one big influence?
To give a (kind of) answer to the last question: it seems that the discussions address the fact that not only there is a similarity between both philosophers but also Nietzsche never did any mention to Stirner even if, as some people say, he was aware of his work.
Note also that if Nietzsche did read Stirner has been a controversial question and there are arguments of both possible answers. Affirmatively there are stories that he was indeed aware of Stirner and had read and discussed The Ego and Its Own as the following fragment of Conversations with Nietzsche:
"Ach," he said, "I was very disappointed in Klinger. He was a philistine, I feel no affinity with him; but Stirner, yes, with him!" And a solemn expression passed over his face. While I was watching his features intently, his expression changed again, and he made something like a gesture of dismissal or defense: "Now I've told you, and I did not want to mention it at all. Forget it. They will be talking about plagiarism, but you will not do that, I know."
Against the influence there are people who consider Nietzsche and Stirner totally different philosophers without anything in common but superficially like Simmel
Here we grasp the distance between Nietzsche and Max Stirner, which cannot be bridged despite superficial indications of the sort that made Nietzsche appear to ally with the sophists. As did the sophists, Stirner holds that all objective standards and values are imaginary and inessential, ghostly shadows confronting subjective reality. Stirner would find it meaningless to claim that the ego referred to anything beyond itself or that it should be graded according to a scale of values. He represents the renaissance of sophism, whereas Nietzsche writes: "We find abominable any decadent spirit who says: 'Everything only to me!'
One cannot speak of Nietzsche's development without being reminded of that freest thinker who was brought forth by mankind of the new age, namely, Max Stirner. It is a sad truth that this thinker, who fulfills in the most complete sense what Nietzsche requires of the superman, is known and respected by only a few. Already in the forties of the nineteenth century, he expressed Nietzsche's world conception. Of course he did not do this in such comfortable heart tones as did Nietzsche, but even more in crystal clear thoughts, beside which Nietzsche's aphorisms often appear like mere stammering.
What path might Nietzsche not have taken if, instead of Schopenhauer, his teacher had been Max Stirner! In Nietzsche's writing no influence of Stirner whatsoever is to be found. By his own effort, Nietzsche had to work his way out of German idealism to a Stirner-like world conceptIon.
Like Nietzsche, Stirner is of the opinion that the motivating forces of human life can be looked for only in the single, real personality. He rejects all powers that wish to form and determine the individual personality from outside. He traces the course of world history and discovers the fundamental error of mankind to be that it does not place before itself the care and culture of the individual personality, but other impersonal goals and purposes instead. He sees the true liberation of mankind in that men refuse to grant to all such goals a higher reality, but merely use these goals as a means of their self-cultivation. The free human being determines his own purposes. He possesses his ideals, he does not allow himself to be possessed by them. The human being who does not rule over his ideals as a free personality, stands under the same influence as the insane person who suffers from fixed ideas. It is all the same for Stirner if a human being imagines himself to be “Emperor of China” or if a comfortable bourgeois imagines it is his destiny to be a good Christian, a faithful Protestant, or a virtuous human being, and so on, or is caught and held captive in orthodoxy, virtuousness, etc.
One need read only a few sentences from Stirner's book, Der Einzige und sein Eigentum, The Individual and his very Own, to see how his conception is related to that of Nietzsche.
For further reading the wiki has an article from where I took the quotes above: Relations between Friedrich Nietzsche and Max Stirner. You may also consider the article Stirner and Nietzsche by Albert Lévy.