Let's look at what this might mean for Google, in practical terms. Some 10-15% of people are LGBT. It stands to reason that the same holds true of engineers. Now, it's well-established that the well is running dry in SV; talent needs to be imported.
So if I'm a gay engineer thinking of moving to SV, how does this change my thoughts about where I want to work? It stands to reason that a significant number of LGBT engineers would be motivated to work for Google by this announcement.
Let's look at non-gay immigrants. Outside of places like China and India, most of the countries Google is looking to recruit from are way ahead of the US on gay rights. So much so that the mere fact that gay marriage is an "issue" in the US serves to perpetuate the bible-thumping moron stereotype of Americans. So even for non-LGBT engineers from Europe, Canada, Australia, etc, this would be viewed by the majority as a reason to work for Google.
Now, how would this hurt them? The argument can be made that, among more conservative (read: Indian and Chinese) societies, where gay rights are not accepted as human rights, that some percentage of potential hires would be put off by such a move. Perhaps, but I think that there are a number of mitigating factors, here. First, gay rights aren't nearly as big a political issue in those countries as in the US. It's frowned upon, but you don't have presidential nominees from one of the two parties proving how much they deserve the candidacy by falling over themselves to say who thinks gays are worse.
Secondly and generally speaking, "culture" is simply nowhere near as big an attraction for people from those countries as status and income. So while it may deter some people, it likely wouldn't be many.
Now for advertisers: will anyone really drop Google for online advertising because of this? Somehow I doubt it. There may be some of the Walmarts and whatnot who drop them, but I find the prospect unlikely.
To sum it up: advantages for Google include easier, more effective recruitment. Disadvantages include potential loss of customers.
I think Google wins this solely on the bottom line, let alone the fact that it's just a good thing to do.