Argentina will play Mexico in the round of 16, while Greece has been eliminated.
Demichelis scored from short range in the 77th minute after his header bounced off Diego Milito and back into his path. Palermo doubled the score in the 89th from a rebound after Greece goalkeeper Alexandros Tzorvas had saved a shot by Lionel Messi.
Argentina coach Diego Maradona made seven changes to the lineup that beat South Korea 4-1 five days earlier.
Captain Javier Mascherano and strikers Carlos Tevez and Gonzalo Higuain were all benched. However, Messi did start and he was given the captain's armband for the first time.
It made Messi, who turns 23 on Thursday, the youngest Argentina captain ever.
Midfielder Juan Sebastian Veron returned after missing the previous game with a right-calf injury.
However, the 2004 European champions Greece left their defensive tactics in the second half, which soon gave Samaras his team's first chance, though the Celtic striker shot just wide after entering the penalty area from the left wing.