Mr Miliband described it as a "very good result" as he claimed the Tories had significantly lost support after polling more than 20% of the vote in the seat in 1997.
Former councillor Mike Kane won the Greater Manchester constituency for Labour, polling 13,261 votes, while the UK Independence Party surged from fifth place to second despite leader Nigel Farage complaining the campaign had been "as dirty as they come".
The eurosceptic party's success and the 11% decline in the Tory vote was yet another by-election blow to Prime Minister David Cameron, who saw his candidate defeated by Ukip for the sixth time since the 2010 general election.
The Liberal Democrats were dealt a humiliating blow when they polled just 1176 votes - not enough to hold their deposit.
Mr Cameron denied the result represented a breakthrough for the Opposition and said the Tories were never expecting to do well in a rock-solid Labour seat.
But Mr Miliband claimed the Tories were not addressing the issues affecting voters in the constituency such as the cost of living and the NHS.
Speaking in Wythenshawe, Mr Miliband said: "Last night was a very good result for Labour. We added to our share of the vote, we gained support.
"We saw the governing parties - the Conservatives and the Liberal Democrats - in total retreat."
The by-election was brought about by the death of Paul Goggins in January.