Gregory hit a free throw with four seconds left to put the Wildcats on top.
Hawkeye Monika Czinano was fouled on the final possession, but after the review, it was determined the time had expired before the foul.
Iowa led for most of the game. Kansas State had the lead for just under two minutes.
Iowa was the highest-ranked opponent the Wildcats have beaten in school history.
“Everyone saw a hell of a game, it went back and forth, back and forth,” Kansas State head coach Jeff Mittie said. “I’m really proud of our team.”
Iowa guard Caitlin Clark, center, is helped off the court after getting injured during an NCAA basketball game against Kansas State on Thursday, Nov. 17, 2022, in Manhattan, Kan. (AP Photo/Colin E. Braley)
Kansas State (3-0) was led in scoring by Serena Sundell and Gregory, who each had 24 points. Sarah Shematsi contributed 18.
“Serena was amazing, especially in the middle part of the second half, but it was a team effort for sure,” Mittie said.
Caitlin Clark scored 27 points, Czinano had 18 and MaKenna Warnock had 12 for the Hawkeyes.
Clark struggled from the field, going 6 of 27 while the Hawkeyes as a team shot 27 of 55. The Wildcats made 28 of 68 shots.
On the final play of the game, Clark was shaken up and was helped off the court.
The Hawkeyes led by as many as 12 in the first half, but the Wildcats ended the half on a 15-7 run to trail by four at the half.
Kansas State held Clark to just 1 for 8 from the field in the first half.
The Hawkeyes’ No. 4 ranking was their highest in nearly 30 years.
“These are special wins, we’ll enjoy this for about two hours since we play tomorrow,” Mittie said. “Super proud of our group and a great game.”
UP NEXT
Iowa: Hosts Belmont on Saturday
Kansas State: At home to take on the University-Texas Rio Grande Valley on Friday