First check to see if the lines are over everything. This would include the Menu, the PIP, and all the inputs. There have been some complaints of the lines being over most inputs but the VGA (computer) port is fine. If the menu or PIP or VGA works, we can also eliminate the DMD (on the engine) as being a cause since that would affect everything. After you have eliminated the DMD you are left with a possible Digital, Analog, or source (cable/antenna/DVD) problem. If these lines are symmetrical and do not look like noise or interference, I would suspect the digital board since it actually does video processing unlike the analog board that is basically a video switch with a comb filter and the audio circuit. Later models incorporated the analog board and the digital board into one "main" board.
Since you said your TV is 4 years old I am assuming its an HLR** series Samsung. I have seen problems with the Digital board on this set that causes it to have lines or blocks on the screen but certain inputs work. People have found that leaving the TV unplugged for a while will make it work normal for while like you have. Other models have had problems with the DMD board causing lines, graphics, freezing and shutdown. Again go back and check to see if everything is affected to rule this out because it can also be a likely cause.
There are no "color guns." That term is usually used to describe tubes in the older projection sets. They used three CRTs and aligned them to create the image. This TV uses a chip that sits in the palm of your hand with a million mirrors on it to reflect light coming through a color wheel.