It depends, but what I have seen so far (w.r.t. Computer Science PhD perspective) is a bit different than other opinions in this post.
I am doing PhD (Computer Science) in the US (at a mediocre school) and most of my cohorts (not most, actually all of them) have a very decent GPA (like 3.9+ out of 4.0), even couple of them have perfect 4.0/4.0 and a very few of them are publishing pretty much good level of research works.
Moreover, most of my faculty members in my school have similar credentials (good grade, good research background, and most of them are from top notch schools like UMD, UPenn, UMich, VTech) -- although my school ranks 60+ in the nation (according to US News, in CS specialization).
Even PhD students in my department who did summer research intern in big companies like google, IBM, Microsoft are also equipped with a good GPA. Even some of them have no publication at all !!, even after being a PhD student for more than 2 years. You will be surprised to know that one of them is currently working as a research intern position at google with no research paper at all, he has been a PhD student for last 2.5 years !! Moreover, if you are from a good school, things will be lot easier.
So, what I see, situation is totally opposite in US. Here Pedigree > GPA > publications.
I used to be the "odd one out", I had a decent publication record (published 4 conference papers during my masters (from a top school outside US) and 2 more in my 1st year of PhD here), but I settled with a low grade (3.2+), compared to others it is actually a "bad". Moreover, the venues that I have published my research works are considered to be quite decent in my field (two of the venues are in the top 20 lists in Microsoft academic search ranking, even I got one best student paper award there. In the US, keeping up both research works and regular course load is quite challenging, at least for me.
Such situation compelled me to focus more on the grades and to start practicing problems from sites like "careercup" to land a job in industry -- that's what others are doing here, and this is a totally disappointing and frustrating experience for me.
I had to cut my time on research as much as possible, now just doing a minimal possible work to maintain my supervisor's "happiness threshold level". Here, landing an academic job is harder than in industries -- unless you are a "rock star" researcher -- and this is the reality. Being a mediocre researcher (like me) from a mediocre school does not count much, neither in industry nor academia.
Last but not the least, I am an international student deceived by the so called delusion of "the land of opportunity".