One flaw we can poke at the ontological argument is that it treats existence as a predicate. It is not. It differs subtly from stuff like being red.
In fact, "existence" is never a predicate. Certainly not in mathematical logic or other modal logics or formal logics. There, it even has different syntax from a predicate: you say "x is red", but you cannot say "there exists an x", only "there exists an x such that x is a red lycanthrope".
Closer syntactic examination of typical ontological arguments reveals that in fact the "predicate" being used has the form "there exists an x such that P(x)", for various predicates P. Call this "meta-"predicate O: O(P) (a predicate on predicates!) means that P is satisfiable. The argument aims to show that if G(x) is the predicate "x is God", then O(G). Note how we've left the realm of first order logic without noticing it -- a situation which can only be described as sophistry.
By contrast, the predicate R(x) "x is red" is first-order: it takes objects (not predicates), and assigns them truth values.
If following St. Anselm's version of the argument (the original and the best!), we now introduce a second meta-predicate, G(P) = "P(x) is a Good Thing for x". If P(x) is "x is pink", for instance, we may make up our minds that G(P) (in this Barbie-led society of ours, it is good to be pink). The argument now claims that G(O): "existence is a Good Thing"!
But what's that bold font doing inside the argument of G? Oops, that's a second-order predicate O inside our second-order predicate G. Immediately G becomes an amazing predicate, able to apply to both first-order predicates and second-order predicates equally well!
To conclude the argument, we need to define the Godliness predicate B(x) as "x satisfies all good predicates" (i.e. "for every predicate T, T(x) iff G(T)"). B(x) is a first-order predicate (it applies to objects), but writing it down requires second-order logic (it talks about "all predicates T", and uses G). The claim is that O(B) ("there is an x for which B(x)", i.e. "there exists a God"); this follows from G(O).
Or it would follow, if we could work out some (any!) logical framework where we can play so hard and fast with the types we allow in our logic. It's not clear what we'd need from our logic even to write it down in a syntactically valid form.
Another flaw with St. Anselm's reasoning is how very much more than the existence of God it manages to prove. Suppose I suspend my logical disbelief and accept the argument. Then O(B), i.e. there exists some g ("God") for which B(g). As we've already agreed that G(P), it immediately follows (from the definition of B) that P(g): God is pink.
If, on the contrary, you refuse to accept that G(P), then you must think that G(~P) ("it is not good to be pink", therefore "it is good not to be pink"; St. Anselm's argument requires that for every predicate Q either G(P) or G(~P)!). It follows that you would then believe not only that God exists, but that S/He (more below) is not pink!
By ruminating further on the nature of sex, we will immediately conclude that God is either male or not male (female? Who knows?). In the course of a few short hours, we will be able to ascribe many Godly properties to God, all within the ontological framework.
If it works at all (see above for why I think it doesn't), then the argument proves far more than it should. One should be very wary of proofs that show too much.