Tests should be prioritised for those who need it most, including those in care homes, he told MPs.
When challenged on the reports of people struggling to get a test, Mr Hancock said it would take a “matter of weeks” to resolve the problems.
Labour said no tests were available in virus “hotspots” over the weekend.
It comes after hospital bosses warned that a lack of tests for NHS workers was putting services at risk.
An increase in demand for coronavirus tests has led to local shortages, with some people being directed to test sites hundreds of miles from their homes.
Meanwhile, Scotland’s First Minister Nicola Sturgeon has said she is hopeful that a backlog in coronavirus test results will be resolved shortly, after “constructive” talks with Mr Hancock.
NHS staff ‘off work due to testing shortages’
School figures show 88% back for start of term
How do I get a coronavirus test?
Call for mini lockdowns as coronavirus cases mount
Around 220,000 tests are processed each day, according to government figures released last week, with a testing capacity of more than 350,000 – which includes swab tests and antibody tests. The aim is to increase that to 500,000 a day by the end of October.
Speaking in the House of Commons, Mr Hancock said there were “operational challenges” with testing which the government was “working hard” to fix.
He said throughout the pandemic they had prioritised testing according to need.
“I do not shirk from decisions about prioritisation,” Mr Hancock said.
“The top priority is and always has been acute clinical care. The next priority is social care, where we’re now sending over 100,000 tests a day because we’ve all seen the risks this virus poses in care homes.”
Mr Hancock said the government will update its coronavirus testing policy shortly, to prioritise the most urgent cases.
Media captionThe BBC spoke to people trying to get tests at a centre in Oldham
Conservative chairman of the Health and Social Care Committee Jeremy Hunt was among the MPs to question Mr Hancock on testing, saying a number of his constituents had to travel for tests, while another key worker had to wait a week for her results.
“A week ago today the secretary of state told the Health Select Committee that he expected to have this problem solved in two weeks,” he said.
“Is the secretary of state, given the efforts that his department is making, still confident that in a week’s time we will have this problem solved?”
“I think that we will be able to solve this problem in a matter of weeks,” Mr Hancock replied.
“So we are managing to deliver record capacity, but as he well knows demand is also high and the response to that is to make sure we have prioritisation so the people who most need it can get the tests that they need.”
Downing Street acknowledged the “significant demand” for coronavirus tests but said “capacity is the highest it’s ever been.”
Despite the health secretary’s promises, there will be no easy solution to the shortages of tests.
All the expectations are that cases will go up. People are circulating more as society reopens and we are entering the period when respiratory viruses thrive.
As cases go up so will demands on the testing system. Even with the promise of more testing capacity in the coming weeks, the chances of shortages continuing remains a distinct possibility.
A new lab is due to open later this month which will be able to carry out 50,000 tests a day. But this could easily be swallowed up.
What it means is that testing will have to be prioritised where it is needed most. That will be in care homes, hospitals and among key workers, as well as where there are local outbreaks. The government’s surveillance programme run by the Office for National Statistics will also be protected.
But this is not unique to the UK. Other countries are facing similar pressures. In fact, the UK is testing more people per head of population than Spain, France and Germany.
It promises to be a difficult winter across Europe.
‘Enormous challenge’
Labour’s shadow health secretary Jonathan Ashworth said Mr Hancock was “losing control of this virus”.
“When schools reopen and people return to workplaces and social distancing becomes harder, infections rise,” he said.
“Extra demand on the system was inevitable, so why didn’t he use the summer to significantly expand NHS lab capacity and fix contact tracing?”
Responding, Mr Hancock said: “I don’t deny that it is an enormous challenge and when you have a free service it’s inevitable that demand rises.
“The challenge is to make sure that we prioritise the tests we have as a nation to those who most need it.”
Clearly there is much more work that needs to be undertaken with Public Health England and the actual public health bodies in those particular local areas, and as a government obviously we work with Public Health England to surge where there is demand in local hotspot areas.”
Ms Patel also said England’s new rule of six meant families should not stop in the street to talk to friends.