All the sentences are fine.
It's an idiom that's been around a very long time! The "house," in this case, refers to the owners of the restaurant or pub or whatever.
http://dictionary.cambridge.org/us/dictionary/english/on-the-house
2. Beer is on the house.
3. You meal is on the house.
4. Dinner is on the house.
5. The pie is on the house.
---------------------------
Are they all grammatical?
Why do you use 'house'? Don't you use 'restaurant'?
It's an idiom that's been around a very long time! The "house," in this case, refers to the owners of the restaurant or pub or whatever.
http://dictionary.cambridge.org/us/dictionary/english/on-the-house
In the context of these sentences, the phrase "on the house" is an idiom that means something is provided or given for free, usually by a business or establishment. The use of the word "house" in this idiom is a metaphorical reference to a place where people are hosted or entertained, such as a restaurant or a bar.
While it is common to use the word "restaurant" when talking about a complimentary meal, the phrase "on the house" is a more general expression and can be used in various settings, not just restaurants. It can also be used in hotels, bars, or other hospitality-related establishments to indicate that the cost of something is covered by the establishment itself as a courtesy to the customer.