Well, the more complete argument would be something like the following:
1. God is, by definition, the greatest possible being.
2. As the greatest possible being, he has all perfections. (That is, all properties which it is better to have than not to have -- power, goodness, etc.)
3. It is better to exist than not to exist.
4. Therefore, God has the property of existence, and has it necessarily.
5. Objection -- Actually, all that proves is that if God exists, he exists necessarily.
6. God possibly exists. Let's cash this out as "There is a possible world in which God exists."
7. But then God exists necessarily in that possible world.
8. So God exists in all possible worlds.
9. The actual world is a possible world.
10. Therefore, God exists in the actual world.
I'm not sure if it works or not. The most common objection (after "Hey! That can't possibly work! -- which isn't actually a valid objection

) is that existence isn't a property, which I don't think I buy. Another possible objection is to dispute the use made of possible worlds, but that's outside of my competency.
(NB: This version of the argument can be found, in a better form, in Alvin Plantinga's book "God, Freedom, and Evil".)