Since this position has less than 6 pieces, the full checkmating line can be produced with the Shredder's online 6 piece DTM tablespace. Here is the full checkmating line that I obtained by playing through it.
[FEN "8/5p2/5k2/8/3K2p1/6P1/8/8 w - - 0 1"]
1. Kd5 Kf5 2. Kd4 Ke6 3. Ke4 f5+ 4. Kf4 Kf6 5. Ke3 Ke5 6. Kd3 f4 7. Ke2 f3+ 8. Ke1 f2+ 9. Kxf2 Kd4 10. Ke2 Ke4 11. Kf2 Kd3 12. Kf1 Ke3 13. Kg2 Ke2 14. Kg1 Kf3 15. Kh2 Kf2 16. Kh1 Kxg3 17. Kg1 Kh3 18. Kf2 Kh2 19. Ke2 g3 20. Kd2 g2 21. Kd3 g1=Q 22. Kc4 Qe1 23. Kc5 Kg3 24. Kb5 Qc3 25. Kb6 Kf4 26. Ka6 Qb3 27. Ka5 Ke4 28. Ka6 Kd5 29. Ka5 Kc5 30. Ka6 Qb6#
One of Black's tactics that you missed is the move 3... f5+. According to the tablebase this is the only winning move for Black. As such, if you miss it you miss the entire win. Another factor is that Black's f pawn causes is able to force the White king away from their pawn. Blacks king is then able to triangulate with their extra space and squeeze White out. White cannot take the Black pawn or else it is simply a faster loss.
Although, I will note, Shredders seems to blip out on move four and mislabels Kf5 as Kf4. This must be some unknown bug.