In high school, I had a 3.5 GPA and barely broke the 50th percentile. It was a good public high school, but grades were quite inflated.
In college, physics was a GPA killer. Scoring 30% on an exam was considered passing and it was only curved up to a C.
Honestly, I don't know which matters more, as I didn't have a good GPA or class rank coming out of college.