Mr Johnson toured medical diagnostics company Hart Biologicals, at Queen’s Meadow Business Park, on Thursday and spoke to staff.
He was accompanied on the visit by party by-election candidate Jill Mortimer and defending Tees Valley mayoral candidate Ben Houchen.
Ms Mortimer is aiming to become the town’s first Conservative MP since Commander John Kerans stood down ahead of the 1964 General Election.
Mr Johnson said the Tories are investing heavily in the area and is confident they can win.
He told the Mail: “I think people will vote Conservative because we’re investing massively in the North East.
"But in Hartlepool in particular we’re putting £3.5 million into improving the hospital. Babies are going to be born in Hartlepool for the first time for a very long time.”
Mr Johnson hailed the go-ahead for the creation of a Teesside Freeport, which Hartlepool is part of, saying it will make it easier to attract business investment and create jobs.
He also highlighted investments in road infrastructure including the A689, a planned upgrading of Hartlepool rail station, local potential for wind farm industry jobs and the production of the Novavax Covid vaccine being made in Billingham.
"Most importantly what we’re offering is a vision of change and hope and we want to build back better from the pandemic,” said Mr Johnson.
"I hope that Jill Mortimer will be able to work with Mayor Ben Houchen and really deliver change and progress.”
The PM praised the cutting-edge work being done at Hart Biologicals, which makes testing kits to diagnose bleeding or clotting disorders, while watching the the work of its research and development and main manufacturing labs.
Mr Johnson said: “This is an incredibly important business. It’s great to see it here in Hartlepool.
"This is exactly the kind of thing we want to encourage.”
Hart Biologicals managing director Alexander Ebinger said of the visit: “It’s a great opportunity to be recognised in this way.
"We’re a specialist company for the region. I think he was very impressed with the technology.
"And it’s nice to have such high-skilled jobs in the area, it’s always something we try to promote.”
The Prime Minister also commented on the ongoing uncertainty around the future of Liberty Steel, which employs 5,000 UK workers including 250 at its Hartlepool site.
Mr Johnson remained non-committal about calls to nationalise the business.
"Our feelings are very much with the steelworkers and their families,” he said. “We understand how important it is for their community.
"We are working with Liberty Steel to see if there is a way through.”
His visit came in the same week that Labour leader Sir Keir Starmer toured Hartlepool Power Station in support of party candidate Dr Paul Williams.
Dr Williams said after Mr Johnson’s visit: “The Tories have disrespected Hartlepool. Over the past decade of them being in power they have taken from the town.
“They’ve taken our A&E, taken police from the streets, taken our police cells, and taken our magistrates’ court.
“Now they’re disrespecting Hartlepool with a candidate that is out of town and out of touch.”
The by-election on Thursday, May 6, follows the sudden resignation last month of Labour MP Mike Hill.