The seriously injured dog underwent emergency surgery. The officer was treated and discharged.
Five people have been arrested and remain in police custody.
Hertfordshire Police sent officers to Featherstone Road at 22.55 BST after a taxi driver was threatened by a man with what is believed to be a hand gun.
The driver ran off uninjured while the robber stole money from the cab before also running off.
In the early hours of the morning PC Wardell and Finn were called to Rowland Road in the town after a taxi company expressed concern about a passenger they had been asked to collect.
A man fled the scene when they arrived and, having given chase, the handler and his dog were stabbed in Denton Road.
“PC Wardell sustained an injury to his hand, but has received treatment for this,” Insp Mark Farrant, head of the Bedfordshire, Cambridgeshire and Hertfordshire Dog Unit, said.
Finn was in a “serious but stable condition”, he said, and was being treated by vets in Hitchin.
The dog unit tweeted later to say: “Finn has just come out of surgery after four hours. The operation appears to have been a success and he’ll now be closely monitored.”
Two teenagers, a 35-year-old woman and a 31-year-old man from Stevenage, and a woman, 36, from Luton have been arrested.
More than 100 people have left messages of support for the officer and his dog since police posted the news on their Facebook page earlier.