Japanese has a curious unwritten rule which states, in essence, that you cannot presume to know the intimate details of a third person's mental state. This is quite an unfamiliar concept in English-land:
○ 私【わたし】はDSが欲【ほ】しいです。 I want a DS.
× 息子【むすこ】はDSが欲【ほ】しいです。 My son wants a DS. (OK in English, NG in Japanese)
Even if your son has been begging you for the last six weeks straight to buy him one of them newfangled DS things (because all his friends have one, even Kentarō, and his parents never buy him anything) and even if you're 100% certain he wants a DS, you can't say this directly. The ~がる suffix is for getting around this problem.
息子【むすこ】はDSを欲【ほ】しがっています。 My son wants a DS. (note the particle change!)
There are other ways to escape this problem without resorting to ~がる, each with slightly different nuances.
息子【むすこ】はDSが欲【ほ】しいと言【い】っています。 My son is saying he wants a DS.
息子【むすこ】はDSが欲【ほ】しいようです。 It would seem my son wants a DS.
Now for your example:
Could I say this to my teacher?
先生【せんせい】は野菜【やさい】を食【た】べて欲【ほ】しがっていますか?
No. ~がる is for a third person's emotions, so you cannot use it when you are talking directly to someone as here. But if we remove ~がる, we end up with this:
先生【せんせい】は野菜【やさい】を食【た】べて欲【ほ】しいですか。 Do you want (someone) to eat their vegetables?
I'm guessing this is not what you wanted to say. Remember that the ~て欲【ほ】しい construction refers not to something the subject (in this case, 先生【せんせい】) wants to do, but something the subject wants someone else to do for him/her. The agent (the entity actually performing the action) can be marked by に:
先生【せんせい】は生徒【せいと】に野菜【やさい】を食【た】べて欲【ほ】しいですか。 Do you want the students to eat their vegetables?
But I'm guessing you wanted to ask your teacher if he/she wants to eat some vegetables. In that case, you could use the ~たい form (again without ~がる).
先生【せんせい】は野菜【やさい】を食【た】べたいですか。 Do you want to eat some vegetables?
Although this is grammatically correct, in this case it is socially incorrect. It's inappropriate in Japanese to directly inquire as to the desires someone of a higher status like this. A better way to phrase this would be:
先生【せんせい】は野菜【やさい】はいかがでしょうか。 Would you like some vegetables?
先生【せんせい】は野菜【やさい】でよろしいでしょうか。 Would vegetables be OK? (suggested by Lukman; implies alternate choices besides vegetables)