1979: Callaghan lost 50 seats and the Prime Ministership, and Thatcher won a majority.
1992: Kinnock gained 42 seats, but was expected to win; instead John Major won a shock majority.
2017: Corbyn gained 30 seats even though he had been expected to be wiped out, and May was reduced from a majority to a minority.
EDIT:
1979: Labour received 36.9% of the popular vote to the Conservatives' 43.9%, a 7-point gap.
1992: Labour received 34.4% of the popular vote to the Conservatives' 41.9%, a 7.5-point gap.
2017: Labour received 40% of the popular vote to the Conservatives' 42.4%, a 2.4-point gap.
Further, a big factor that neither Callaghan nor Kinnock had to contend with, but Corbyn did, was the SNP. Labour majorities were often based on their winning most of the seats in Scotland, a task made much harder by the rise of the SNP in recent years, and this time even harder due to the Scottish Conservatives having a popular leader in Ruth Davidson. (As one SNP supporter noted, it really was true in a lot of ridings that "A vote for Labour is a vote for the Conservatives" because those ridings had become SNP-Conservative battlegrounds.)