Is вершок a special Russian metric unit, or something?
It's old antropomorphic unit. While "inch" is "thumb-wide", "вершок" is "pointing+middle fingers wide", which is formally a little less than two inches. But otherwise "вершок" is just like "inch" - "something very small".
Which горшок is meant, the one in which babies poop?
It's hard to say but I believe it's a (food) bowl. So it rather means sort of "two inches above a soup bowl" / "you're hardly seen behind a soup bowl".
Another version is that it's actually "корх", not "горшок" - another outdated unit - a fist, i.e. four fingers wide. So it becomes: "от коршка два вершка" = "a fist and two halves" (or even "a fist without two halves", i.e. zero).
Anyway it's unlikely related to a chamber pot, as "горшок" was a general term in old times.
The whole expression used in a live speech may mean both "too young" and "too small".