Obviously opening theory is important but if you don't keep up to date then it can sometimes do more harm than good. In the following game my opponent knew something about the opening but he wasn't aware of recent improvement for White and he ended up losing a painful game:
What can be done to help prevent this kind of thing? Well, it's important to keep an up-to-date games database for reference. Games can be downloaded to use on Chessbase from http://www.theweekinchess.com/twic
When working on a line search key positions in the database and see what has been happening recently in strong players' games. This way you can at least avoid some nasty surprises...
Of course they can still come up with a strong novelty but that happens far less than someone simply repeating a strong idea they've already seen. Let me know in the comments if 'a little knowledge' has ever gotten you into trouble during a game!