In what case is it justifiable for your own story to differentiate its plot from another, similar plot? For instance, I'm writing a story with a serial killer who whose motive sounds akin to the Jigsaw murder from the Saw franchise. I justify he is merely testing for people to work for him and the government's tyranny.
"Do you think I'm some cliché self-righteous psychopathic murderer from a long series of movies, merely bound on getting people killed in most sophisticated manner, giving them an illusion of chance? Do you really think this low of me?"
OTOH, the twist you're giving in the question description really seems rather minor. Testing people to work for him? Original Saw antagonist got his first follower through his "tests" so that's a very minor twist - and Saw II saw a protagonist who was a crooked cop... not very far from "government tyranny" to be an essential twist. Plus that gets awfully close to what V does to Evey in V for Vendetta, so - how far does your story fall from a crossover of the two?
I have not seen "Saw" so I can't comment on the details you refer to. But in general:
This is all a matter of degree. Unless you're exceptionally creative, it's likely that any story you write will fall into one of a pretty small number of common categories: romance, murder mystery, coming-of-age, time travel, etc.
There's a sense in which you could say that every romance story is "another Romeo & Juliet rip-off". There's a sense in which you could say that every murder mystery follows the same basic plot line: a murder is committed, the brilliant detective is called to investigate, there are some red herrings that lead him to suspect the wrong person, then he catches the real murderer, the end. Etc.
If you're worried that your story is just like somebody else's because they're both about a criminal trying to outwit a brilliant detective, and that's about the extent of the similarity, I wouldn't worry about it for a moment.
If you're worried that your story is just like somebody else's because the crime is almost identical, the criminals in both stories have very similar personalities, the crucial clue that leads to him being caught is pretty much the same thing, etc, then you have a problem.
You COULD go throw the details and start making changes to make your story different. If there were just one or two details that were two obviously the same, I'd do that. But if there are many points of similarity, and you really must admit that you got the whole idea for your story from reading/watching the other, then I think you need to go back and come up with SOME very fundamental idea that makes yours different. Make it an idea that has implications throughout the story. Not just, "Well I'll set mine in Los Angeles instead of New York and so all the street names will be different." But, "While his villain works hard to conceal his crime from the police, I'll make my villain flaunt his crime before the police and dare them to catch him".
Frankly, I think if you start out saying, "I really liked such-and-such story, I'd like to write one just like it", you're going about it wrong. You should be trying to be original, not a clone. It's one thing to say to find that as you develop your story, it's getting too much like some other story you know, and you need to make some changes so it doesn't sound like a clone. It's quite another to deliberately set out to make a clone and look for the minimum set of differences to throw people off.
(If you're writing a script for a TV show or movie, disregard the above paragraph. I understand that in Hollywood, the goal is to pick some popular TV show or movie and copy it, on the reasoning that if the original was popular, your clone should be popular too. Hollywood has this idea -- maybe it works for them, it seems pretty dumb to me -- that what makes a story popular is not creativity, originality, and smart writing, but rather a collection of surface plot elements. Like I read that after the Harry Potter movies were successful, some Hollywood exec concluded that this meant that Americans wanted to see movies "about British school children" and so began a couple of such projects. I remember when "Star Wars" proved popular, we quickly saw a rash of unoriginal movies about wars in space. Etc.)
I guess sometimes it's about writing, not the idea... And sometimes you just get inspired by some other thing. The line between the two is really thin.
For example, Walking Dead has a lot of similarities with Romero's movies, yet it's completely different not because of the idea but because what happens with the characters and the motivations.
It's just like somebody said in a previous reply, if you need to justify, you are doing it wrong.
Don't bother with the macro idea being similar because this happens all the time. Just focus on what makes the book really different and unique than your book will become an unique piece of work.
It sounds like you need to wait a while before writing this. If all you can think of is something you've already seen, you're not spending enough time taking in ideas. In this case, I'd actually suggest you spend several hours on TVTropes, where you'll find better ideas than the ones you're getting, and decent analyses of those ideas.
Secondly, quit thinking of your work in relation to other people's work. If it's too similar to other plotlines, that needs to be changed, but after you've changed it, you need to get Saw out of your head. If you've changed things enough, you won't have to focus on proving you aren't a ripoff, and if you continue to focus on that, you'll end up using all of the ideas from Saw anyway.
If you change things, read it through, and still can't help thinking of Saw, maybe you should write something else for a while and come back to it later.
All the aforementioned answers are really good, but you should keep in mind that no matter what you write it is going to be similar to SOMETHING out there. Every idea, no matter how original you think it is (and I am speaking from experience) will have been done in some form before. It is just important that you realize no one can tell the story quite like YOU can, and that is what makes it unique to you.
You can't copyright an idea, only the expression of one. If your story is a lot like someone else's, then don't rewrite that other person's story.
That said, there will naturally be similarities between two stories if they play on same field. Serial killer stories are an excellent example. There are countless crime novels (not to mention movies and TV programs) about serial killers (I'm writing one myself), and certain elements are obvious and expected (e.g. a killer, a series of murders).
The trick is not to let your story about a serial killer get too close to someone else's. Think of your story as a circle. The other person's story is also a circle. Both stories together form a Venn diagram. The intersection (that part in the middle where the circles overlap) contains all the usual obvious and expected stuff (killer, series of murders). There may be a few more similarities in there, too, making the intersection a little bigger (maybe both stories are set in New York, both have male protagonists, both are set in winter).
Too many similarities, and that intersection is going to start getting too big. Depending on how much your story is like the other, your readers will go from "It's a lot like..." to "It's a copy of...", until someone says the P word. Plagiarism.
Keep your intersection as tight as you can. That's my suggestion.