blessing in disguise

a blessing in disguise ( a good thing that you don't recognize at first as a good thing) — что ни делается, все к лучшему; ~ нет худа без добра

Example 1: "I lost my job and was upset at first, but I found a better one and have been much happier since." — "Losing your job was just a blessing in disguise!"
Example 2: "My car broke down again, but maybe it was a blessing in disguise; I've been wasting too much time driving around anyway."
Example 3: "The hotel is full tonight; we will need to find a new place to stay." — "Maybe it's just a blessing in disguise; I've been wanting to try a new place anyway."

(from GoEnglish.com)
=======
It is as if the good thing (a blessing) were wearing the clothes (in disguise) of some other thing, so at first you do not see it as the good thing that it really is.