Is it necessary to understand every detail of a research paper?
I would posit that there are three general levels of depth to which you need to understand a paper:


Understanding context: For anything related to the work that you are doing, you need to be able to understand it well enough to explain how it relates to your work, and why it should or should not be directly compared.  This is the "general idea" level that you describe.
Direct comparison with other work:  For work that is closely related to your own work, you will likely need to be able to make a direct comparison, possibly even by running instances of the other work on the same problems.  Here, you need to understand at least well enough to correctly apply the other work and to make a cogent comparison of the relevant qualitative and quantitative attributes.  You'll probably need to understand most of the paper for this, but not necessarily all.  For example, you might not need to understand the proof of an algorithm's correctness, but would need to understand its uses and performance characteristics.
Building on top of other work: For work that you are actually making use of in developing your own work, e.g., by using it as a component or by extending a prior technique, you need to understand it very thoroughly indeed.  This is the level at which you really do need to understand everything in the paper.