This expression is found in Midrash Lekach Tov1 (Esther 4:17):
מה שאלתך מלמד שלא היתה אוכלת עד שאמר לה מה שאלתך והוא אמר מהרו את המן וביום י"ו בניסן נתלה המן לא עמד גזירתו אלא ב' ימים וביום ג' נצלב כי נדדה שנת המלך בליל שמורים. ישועת ה' כהרף עין יחיינו מיומים וביום השלישי יקימנו ונחיה לפניו
"What is your request" (Esther 5:6): This teaches that Esther did not eat until Achashveirosh said to her, "What is your request?" And he said, "Rush Haman" (5:5), and Haman was hanged on the 16th of Nisan. His decree lasted only two days, and on the third day he was hanged, since "the King's sleep was disturbed" (Esther 6:1) on the "Night of Watching" ("Leil Shimurim", i.e. the night of the 15th of Nisan; see Sh'mos 12:42).2
The salvation of HaShem is like the blink of an eye. "After two days, He will revive us,3 and on the third day, He will raise us up, and we shall live before Him" (Hoshe'a' 6:2).4
This expression is related to earlier statements in the Mechilta (Bo §14) and Tanchuma (Bo §9) that HaShem took the Jews out of Egypt immediately once the designated time arrived ("מכיון שהגיע הקץ לא עכבן המקום כהרף עין", "As soon as the appointed deadline arrived, the Omnipresent did not delay them even for the blink of an eye").
The term "k'heref ayin" ("like the blink of an eye") is also found in the Talmud where R' Yose describes the transition of bein hash'mashos (B'rachos 2b, Shabbos 34b, Y'rushalmi B'rachos 3a).
1 Composed in the late 11th century by R' Tovia ben Eliezer.
2 Haman enacted his decree on the 13th of Nisan (Esther 3:12), and Esther called for a three-day fast (4:16) starting that day according to Esther Rabba (8:7), or starting the following day according to Rashi on 4:17 ("שהתענ' י"ד בניסן וט"ו וט"ז"). On the third day (the Lekach Tov appears to follow Esther Rabba in counting from the 13th), Esther first appeared before Achashveirosh to appeal to him (5:1). Achashveirosh's sleep was troubled that night (6:1), which would seem to make it the night of the 16th. This may have also counted as Leil Shimurim due to the doubtful status of the second day of Yom Tov in the Diaspora.
Perhaps an alternative explanation is that the text of the Lekach Tov may contain a copyist error that should be emended to "וביום ט"ו בניסן נתלה" ("and he was hanged on the 15th of Nisan"). However, this would create a difficulty since it would imply that Esther first appeared before Achashveirosh on the 14th, which was only the second day after the decree.
3 The juxtaposition of ישועת ה' כהרף עין and יחיינו מיומים forms an imperfect rhyme for a thematic and poetic culmination of the section.
4 The Y'rushalmi (Sanhedrin 11:6) understands this verse as a specific reference to the future resurrection of the dead, while Rashi and other commentators view this as a general reference to the future redemption of the Jewish people after two long diasporas.