Often players seem to get the extra kick of motivation in a Slam when they just get through a tough match in the first 4 rounds.
Here are the ones I remember:
1985 - Boris Becker wins Wimbledon
In the 3rd round, Joakim Nystrom served twice for the match in the 5th set, but 17-year-old Becker came through somehow and later was the youngest Wimbledon champ ever (he had another very tough 5-setter in the 4th round against Mayotte).
1989 - Boris Becker wins the US Open
Probably the craziest of all. In the 2nd round, Becker surprisingly went 0-2 sets aqainst Derrick Rostagno. In the 4th set tie-break, Rostagno had a 6-4-lead and 2 match-points. On the 2nd one (on serve), he was at the net ready for the winning volley when Becker's shot touched the net and became an unreachable lob. Becker went on winning the set, the match and later the tournament (the final against Lendl).
1990 - Stefan Edberg wins Wimbledon
Edberg had to survive a very tough match in the 3rd round, just defeating Amos Mansdorf 9-7 in the 5th set. He went on to win the event in a crazy final against Becker.
1991 - Boris Becker wins the Australian Open
In the 3rd round, Becker beats Omar Camporese 7-6 7-6 0-6 4-6 14-12 after 5 h 11 min. A week later he became no. 1 for the first time after beating Lendl in the final.
1991 - Michael Stich wins Wimbledon
In the 4th round, Alexander Volkov was serving for the match in the 5th set. At 30-30, Stich's passing shot seemd to go out, but it touched the net and somehow went in. Stich won the set and later the tournament with a win over Becker in the final.
1996 - Boris Becker wins the Australian Open (not my fault that he did it all the time
In the 2nd round, Becker played unknown Swede Thomas Johansson (!). He lost the first two sets 4-6 2-6 and was 1-2 0-40 down in the 3rd when he played a volley very close to the line (actually I think it was out). It was called in, and Johansson was very mad (probably too much, considering the score). Becker then had no trouble to win the match in 5 sets, and later he beat Michael Chang in the final with the best tennis he ever played.
1999 - Andre Agassi wins the French Open
In the 2nd round, Agassi was just two points away from defeat in the 4th set against Arnaud Clement. He came through and won the only Slam he hadn't won yet with a great comeback against Andrej Medvedev.
2001 - Gustavo Kuerten wins the French Open
In the 4th round, Kuerten faced qualifier Michael Russell. He was down 3-6 4-6 2-5 and match-point. He saved it with a very long point, and ended up winning the tournament, beating Alex Corretja in the final.
If you remember more of these, please add them.