Israeli police shot and killed three Palestinians in the attack, police spokesman Micky Rosenfeld said.
The officer, Hadar Cohen, 19, was shot in the head during a shootout with the attackers, and she was rushed to the hospital in critical condition, Dr. Osnat Levtzion-Korach, director of Hadassah Mount Scopus Hospital, told CNN.
Emergency services attempted to resuscitate Cohen, but she died a few hours later.
Police said the attackers were carrying three automatic weapons and knives as well as two explosive devices that did not detonate, leading police to suspect they could have been planning a mass attack on civilians.
The attack occurred as border police checked the men at the Damascus Gate after they aroused authorities' suspicions.
As police checked their IDs, one of the men produced a gun and another a knife, and attacked Cohen and a colleague, Rosenfeld said.
Her colleague sustained moderate injuries from stab wounds, Levtzion-Korach said.
The attackers, from the West Bank town of Jenin, were ages 20, 20 and 21, Rosenfeld said.
"We're going to have to look at where they came in from, where did they get hold of the weapons," Rosenfeld said.
"We're seeing a different phase of both equipment and also an increase in the level of the type of attacks that have taken place, so this is something that we're going to have to assess in terms of security."
Israel has experienced a spate of violence since October.