The first thing you should notice is that 1.Kg4 is stalemate. The next thing to spot is that if it were Black's move, then he would be mated at once: 1...Kf5 2.Bh7 or 1...Kh5 2.Bf7. So all White has to do is preserve the status quo.
A quick look, however, confirms that it is impossible. The bishop on f6 cannot move without losing control of g7 or g5; the pawn on d5 cannot advance without giving up control of e6, so 1.d6 Kf5 spoils the mate White had ready; and 1.Be6 Kh7 leaves the black king impossible to trap in time.
So if White cannot preserve the status quo, he must re-create it. Here's the answer: 1.Kg2!! Kf5 (or 1...Kh5 2.Kh3 Kg6 3.Kg3) 2.Kf3 Kg6 3.Kg3! and mate next move.