Roberto Firmino's brace had cancelled out Fernando Llorente's double but Gylfi Sigurdsson sealed a valuable three points with a 74th-minute strike.
Swansea had never won before at Anfield where Toshack played for eight years.
"Liverpool probably thought it was going to be a lot easier than it turned out," Toshack told BBC Radio Wales.
"The way Swansea won it was great. Football is full of these surprises.
"It's one of the results of all time in the history of the football club. It's got to give them a terrific boost."
Toshack had said Swansea would be relegated from the Premier League prior to their game against Liverpool and questioned Paul Clement's appointment.
Media playback is not supported on this device
The former Liverpool striker said the Swans deserved their victory, however, and claimed it was not only down to a poor Liverpool performance.
"In the first half, Swansea were very well focussed and organised. Liverpool probably thought the game was going to be a lot easier than it turned out to be.
"Swansea, to go away from home and score three goals at Anfield or anywhere in the Premier League is a terrific achievement.
"As disappointing as Liverpool were, you have to look at how focussed Swansea were particularly in that first 45 minutes."
Swansea City's win against Liverpool at Anfield was one of the greatest victories in their history, according to former manager John Toshack.