In Luke we are told that Satan entered into Judas before the Last Supper, and he went to the chief priests and agreed to betray Jesus. This is Luke 22:3:
The last supper comes later, at Luke 22:14 onwards. The gospel of John, however, says that Satan entered Jesus at that time. This is John 13:27:
The solution is fairly obvious: Satan entered into Judas at least twice. There's no indication that John is speaking of the same incident as Luke. The problem is only severe if you see Satan as having a permanent and unshakeable hold on Judas from the time he first "enters" him. This certainly isn't a reading that's forced on you.