Yep, that is caused by slamming shut the lid and the magnet hitting the thin plastic bezel. The problem is that integrated piece includes the keyboard, trackpad, trackpad button, and power button built into it. Labor-wise, it's not too intensive but it involves several tiny screws to keep track of.
Did you purchase AppleCare with your MacBook or within the first year? If so, just take it into an AASP and they'll replace the keyboard bezel pending it wasn't caused by abuse. Out of warranty you're looking at an hour's labor plus the part.
Labor rates vary, so check out Apple's online AASP locator to find one near you.