Suppose you do bad in undergraduate school in say computer science. But you do very well in a masters program in computer science. If you want to apply to a PhD program in computer science, will the masters degree grades offset the undergraduate degree grades?
In general, recent performance will tend to outweigh prior performance. I will look at a student with a graduate 4.0 and an undergraduate 3.2 much more favorably than the converse (unless there are obvious extenuating circumstances, such as a large jump in the quality of the graduate program compared to the undergraduate).
The source of the GPA drop is also important. A bad freshman year is almost certainly ignorable. A bad senior year is a red flag. Similarly, I will give much less weight to grades in "general education" classes, as I'm not hiring them based on their ability to analyze Shakespeare or Milton. Important classes for the major, though, can be deadly even if they are in the undergraduate years.