Senior police official Mian Saeed said the gunmen opened fire after police launched a routine house-to-house search in Urmar Payan village, triggering a gunfight which lasted more than half an hour.
"Three policemen were killed and eight wounded in the exchange of fire. One attacker was also killed while others fled the area," Saeed told AFP.
Read: Policemen among 3 injured in Peshawar attack
Peshawar has suffered numerous Taliban attacks but he said it was not yet clear if the gunmen were militants or criminals.
The attackers used a grenade and fired a mortar, Saeed said, adding that the police had fought bravely despite casualties and forced them to flee.
Police later recovered "mortar shells and other explosive material" from the house.
Peshawar police chief Mubarak Zeb confirmed the clash and casualties.
The city suffered the worst terror attack in history in December when Taliban gunmen massacred more than 150 people at an army-run school, most of them children.
Read: Beginning of the end: Two army men, 6 terrorists killed in Shawal gunfight
But since then there has been something of a lull in violence. The last deadly attack in the city came in February when three heavily armed Taliban militants stormed a Shia mosque, killing 21 people.
Pakistan has been waging a major offensive against insurgent hideouts in the northwest for over a year in a bid to quell an insurgency that has raged for more than a decade.
Officials say nearly 3,000 militants have been killed since the launch of the latest offensive.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ