I used this phrase in a conversation with my wife yesterday and was surprised to learn that she had never heard of it. This led me to wonder where it came from.
By request from the comments: here is a link to a Language Log post that, among other things, explains the origin of the phrase.
The explanation above taken from
Nigel Rees, Cassell's Dictionary of Word and Phrase Origins (2002), p. 90
"From your lips to God's ear" appears in Arabic (من فمك لباب السما ياختي) about as much as in Hebrew (מפיך לאוזני אלוהים). The expression does not appear in Hebrew literature before the rebirth of modern Hebrew in the last century. In modern Hebrew it is commonly used in contexts such as ynet.co.il blogs that indicate that the writer believes the origin of the phrase is Arabic. I venture to guess that the expression migrated from the Arabic to the Jewish colloquial in Andalusia and from there to the Yiddish. A quote from Arabic literature of the period might answer the question more conclusively. In any event, the expression is loaned in English. The expression can be used to indicate true heartfelt agreement and can also be used sarcastically or wryly as in "would that it were so", or "insha'alah".
There are two forms of this idiom. The first which you identify:
Idiom expressing a wish that the desires of the person to whom the saying is spoken will come true. The original, literal meaning of the saying indicates that the speaker wishes that whatever the addressee has just said will be heard by God and answered.
May be used sarcastically, in which case it is roughly equivalent to "good luck with that."
Eg. J: "Hopefully, my investments are going to return 400%!"
M: "From your lips to God's ears."
The second form is less common and reversed. It is from God's lips to your ears.
It simply means the instruction came from on high and was passed to you directly (no one else heard/knows). It conveys a high level of confidence/knowledge in the information passed.
Eg. J: "John was fired by Tom" M: "How do you know?" J: "All I can say is that this is from God's lips to your ears".