They are important, but not as important as MS3 grades. Clinical grades during MS3 and USMLE are two of the most important factors in getting the interviews. IMO other things are such as LORs, Research, etc are secondary.
1st and 2nd year grades don't matter at all (unless its for qualifying for AOA, which does matter). I honored one class during all of 1st and 2nd year and matched at my #1 with "you will match here if you want" emails/phone calls from my other top 3. I received interviews from 24/27 places I applied.
Failing a class does matter. Otherwise, just work hard to know the material and prepare for Step 1 (which DOES matter), and forgot about it.