MIRACLES


25.Qe5 is the automatic move that exploits the holes in your position (it also threatens mate in 1). 25.Bxa7 shows inexperience, misplacing the bishop to capture a meaningless pawn. After 25...Bf3 I already guessed exactly how the game would end. Your opponent didn't know that mate pattern and tried to prevent mate with 27.h4. Instead a safe move is, for example, 27.Bb3 and black isn't even able to generate a threat anymore. 28.Qe5 doesn't "almost threaten checkmate" it does threaten checkmate (Qg7).
None of this had anything to do with your queen sacrifice.