Samantha Dixon has become the constituency's new MP with a majority of 10,974 votes.
Her party secured more than 61% of the vote with a 13.76% swing from the Conservatives.
The contest was triggered by the resignation of Christian Matheson.
The Labour MP quit after Parliament's watchdog recommended he be suspended for "serious sexual misconduct".
Mr Matheson admitted he had committed a minor breach of the code and tendered his resignation with "great sadness".
Labour was fully expected to retain the seat, which it won in 2019 by a majority of 6,164.
In that election, the Conservatives came second, winning 38.3% of the vote. Labour secured 49.6% and the Liberal Democrats came third with 6.8% of the vote.
This time round, Ms Dixon won with 61.2% of the vote, defeating Tory candidate and NHS nurse Liz Wardlaw.
Election officials earlier confirmed that turnout was 41.2%, with a total of 28,541 votes cast in the December poll.
In a speech following the result, Ms Dixon said people in Chester "have said unreservedly that Rishi Sunak's Conservatives no longer have a mandate to govern."
She added: "I don't think they believe that the Conservatives have the answers, I think they think it's Labour's turn now."
The Conservatives have performed badly in recent by-elections, losing Wakefield to Labour and the historically safe Tory seat of Tiverton and Honiton to the Liberal Democrats.
Those losses increased political pressure on Boris Johnson, who later resigned as prime minister.
Thursday's by-election was the first to take place since Mr Johnson quit and his successor Liz Truss caused market turbulence with her mini-Budget.
During her campaign, Ms Dixon pledged to stop raw sewage being dumped into the River Dee.
Conservative Liz Wardlaw had promised to fight for funding for the Countess of Chester Hospital and improved rail connections to London, Manchester and North Wales.
* Samantha Dixon (Labour) 17,309 (61.22%, +11.58%)
* Liz Wardlaw (Conservative) 6,335 (22.40%, -15.93%)
* Rob Herd (Liberal Democrat) 2,368 (8.37%, +1.53%)
* Paul Bowers (Green) 787 (2.78%, +0.15%)
* Jeanie Barton (Reform UK) 773 (2.73%)
* Richard Hewison (Rejoin EU) 277 (0.98%)
* Cain Griffiths (UK Independence Party) 179 (0.63%)
* Howling Laud Hope (Official Monster Raving Loony Party) 156 (0.55%)
* Chris Quartermaine (Freedom Alliance) 91 (0.32%)
Party officials overseeing counting for the City of Chester by-election
Before the by-election, Samantha Dixon outlined her priorities for Chester