What was the specific trap being set for Jesus by the Pharisees in John 8? In the story of the woman caught in adultery, John indicates that the question of the Pharisees was a "trap".  


  2 At dawn he appeared again in the temple courts, where all the people
  gathered around him, and he sat down to teach them. 3 The teachers of
  the law and the Pharisees brought in a woman caught in adultery. They
  made her stand before the group 4 and said to Jesus, “Teacher, this
  woman was caught in the act of adultery. 5 In the Law Moses commanded
  us to stone such women. Now what do you say?” 6 They were using this
  question as a trap, in order to have a basis for accusing him.  
  John 8:2-6 (NIV)


What specifically was the trap they were trying to get Jesus to fall into?
At this time in history Israel was under the rule of the Romans. The Jewish law required that a woman caught in adultery was to be stoned to death.


  Leviticus 20:10 NIV
  
  “‘If a man commits adultery with another man’s wife—with the wife of
  his neighbor—both the adulterer and the adulteress are to be put to
  death.


But under Roman law a person could only be put to death by the judge, otherwise it was murder. Much like our law today. Christ did not have the "authority" as a man under Roman law to sentence anybody to death.

Thus, if Christ had answered that the woman was to be stoned He would have be breaking the Roman law. Not only this, but the act of stoning this woman would have gone against the mercy, grace and forgiveness that He had been preaching about.

But if He answered to let the woman go, then He would not have been upholding the Jewish law. Christ himself had been teaching the people that whoever loves God will obey God. So to not Stone this woman would mean that Christ was not in obedience to God, which is also a sin.