Which GPA is more important for applying to PhD programs, graduate or undergraduate?
There are several competing concerns that make this question difficult to answer.

As BrenBarn notes in his comment, more recent information is more indicative of your current skills. Especially if you show significant improvement, which most programs will take into account. Graduate programs will also (hopefully) consist of more difficult classes that are closer to the difficulty level of the material you will be tackling in graduate school.

On the other hand, applications seem to be very comparison-based. Applicants for a year are compared against each other and also against successful (or unsuccessful) candidates from previous years. This is anecdotal, but I know that some programs explicitly group and rank candidates based on their undergraduate institution for their first round of decisions (e.g. the top couple from each top-5 school are always accepted, the bottom third from most schools are rejected). The fact that most applicants to US PhD programs don't have a graduate degree means that your undergraduate GPA may be more convenient for these comparisons, so it might actually get looked at more.

In programs that do this, I suspect that your undergraduate GPA will be more important for getting into the group of applicants that will actually be considered, but that your graduate GPA will become more important after that, as the committee examines the borderline applications more closely. But this is probably dependent on the specific program and their procedures, and I don't think that there is a consistent answer.