Do grades obtained after applying to a graduate school matter?
Yes.  Many graduate departments may accept your application, but require a final undergraduate transcript before you actually start your first semester there.  If your grades have seriously dropped in your last semesters, they could rescind the offer of admission, and not let you in after all.

So in short: extra good grades in your last semesters can't help you, but bad grades can hurt you.