"Witaj, dzień dobry!"
Translation:Welcome, good afternoon!
It is. Aside of Good + time like Dzień dobry, dobry wieczór, dobranoc there are those 'imperative' greetings. Witaj (be greeted/welcomed), bądź pozdrowiony (be greeted), bądź zdrów (be healthy), żegnaj (be 'said farewell' or sth similar), trzymaj się + nothing or how e.g ciepło (stay in a good shape), bywaj (aside goodbye it also has a meaning that is hard to translate, it is be!, not continuously but repeatedly). Third category is first person singular: witam, pozdrawiam, żegnam. The rest is: Siema, elo, hej, salut, ave, jak się masz? (How are you doing?), pa pa.
"witać" is generally problematic... your sentence mixes informal "witajcie" with formal "panie i panowie" ('e' is not a Polish conjunction), yet in such a sentence this is actually suitable, I don't see a way to use a formal option - "Niech panie i panowie witają" is a bit absurd, it would mean that you think that they should welcome someone.
I think it's safest to say "Witamy, panie i panowie!" - you change the subject, 'we' welcome you. Not that "Witajcie" means that you welcome us... it's somehow not exactly intuitive ;)
If you welcome your friends in your house, all forms: "Witaj/Witajcie/Witam/Witamy" make perfect sense - just choose the ones where the grammatical number is appropriate.