There are definitely many, many factors. Grades and school are the biggest, based on what I've observed, but networking can also have a big impact, especially outside of BigLaw.
The tricky thing with BigLaw (as well as bigger companies) is that hiring decisions are typically made by committees, and they really like to have objective standards that they can use to justify hiring decisions, to get everyone on board. However, smaller firms will often place a higher importance on personality and fit because the fewer employees there are, the more difficult it is to avoid people you dislike. Basing fit on a couple of interviews is really difficult, though, so typically those students they've come to know and like through at least a few non-interview encounters are going to seem like the safer bet.
Legal employment definitely seems to be more prestige driven than most industries, but that doesn't mean that networking is useless.
Networking can net you interviews where you might not have gotten interviews originally, but yeah it's unlikely to overcome poor grades. It probably helps a fair bit if your grades are more mediocre or among the weaker of what they tend to take by the firm's standards, rather than poor.
Definitely; this is precisely in line with what I've witnessed. One anecdote that particularly stood out to me was when I was a legal secretary for a partner on the recruiting committee. I would routinely open her mail (at her request) if it was work related, and she would often open the personal and ambiguous mail in front of me as well. One day I noticed a lovely hand-addressed card. We had a friendly relationship, so when she opened it, I asked whom it was from. She read it, then tossed it in the recycling bin and said it was from someone who interviewed with the firm but wouldn't be hired because of his grades. He had gotten the interview through a contact, but that just wasn't enough. So, I get his frustration, but I still disagree.
I don't have the grades (top 10%) to go back to my old firm...I saw the transcripts of the kids they recruit, so, I'll agree with thesteelers on that part re BigLaw, at least for very grade-focused firms, like my former firm. The kids from my school with the grades, though, still probably won't be hired by my former firm. It's not impossible; they have recruited from here in the past, but in current time, grades alone are not enough. If I did have the grades, though, my networking with my former bosses would, I have no doubt, help for a 2L spot (the only 1L spots are diversity there and rare at that). One of my former coworkers, who went to a lower ranked school than I go to, is currently back working there as an associate and is probably the only person from her school (at least who's graduated in the past decade) at the firm. So yes, networking can be important, even if you have the grades.