Greed was sealed by Evny under Dante's orders because of his namesake, he got too greedy and rebelled against her.
How he was sealed was that a Transmutation Array was drawn on the walls of his cell and the skull from the body of the human he once was is centered on one of the walls, i think the array is different to the one Dante uses to drain Greed of the Red Stones and more of an amplifier for the paralysis inducing effects of a Homonculi's remains has.
When the array shuts down because of the damage to the lab (seen when the array isn't lit up) Greed is able to move around more freely and even takes his skull with him so while me may have still been weakened from having his remains nearby he's not as weak as he was when the array was active.
However that's speculation on my account of the array in the room, we do know in the 2003 anime Homonculi are weakened when they are in the presence of their remains (or in Wrath's case a reminder of when he died), Greed's skull is used to keep him trapped and that the array made him weaker when it was active than what just the skull did.
We also know the array in lab 5 doesn't work in the same way as the one in Dante's residence when Greed visits her as when it activates he vomits up the Red Stones, considering how long he was trapped he would have been near death if he had kept vomiting Red Stones as we see just how bad of a shape he is in when he was in Dante's trap for even a few minutes.