You do it by both grades and ability. You don't punish someone who worked hard for his grades by rejecting him just because some psychologist determined that the lazy ass who watched tv all weekend(and failed his exams) has a higher IQ.
If he failed his exams, then no. But you also don't give a blank check to the average joe that scores 70s on his exams, but gets As because the teacher/school weights attendance and extra-curriculars to compensate.
For instance, I went to school with plenty of people who received straight As, but scored average at best on any test and had SATs under 1000. Conversely I (and others like me) failed nearly every class but had almost straight 100% on my tests and assignments (that I turned in), and exceptional scores on entrance and other exams. Regardless of other factors, which of the two sets is going to actually be capable of learning enough medicine not to kill people, or enough correct interpretation of law to keep someone out of prison?
Average people can do great at jobs, and shouldn't be considered 'lesser' for their lack of giftedness. However, that doesn't mean they should receive limited resources to attend institutions designed to propel the intellectually capable to world changing discoveries.