I know David Gerrold and Harlan Ellison have an agreement: Ellison wrote the "best" episode while Gerrold wrote the "most popular" episode.
"The Trouble with Tribbles" is probably the most popular episode with people who don't identify themselves as Star Trek fans. Since there are more of "them" than there are of "us", then by those standards it's the most popular TOS episode.
It's very accessible by the casual viewer, you don't need to know much about "Star Trek" to enjoy it. It's not my favorite by any means, but it's still enjoyable to me.
Both Tribbles and City are popular and well known to the general public & casual fan of the series. And both
are considered among the best of Trek.
If I had to pick one episode to represent the series I would give the edge to City over Tribbles since it much more a feat of Science Fiction writing.
But Tribbles is still great fun and I think the idea how the cute furry creatures are actually a menace (although not in a typical way) is actually very clever. I think that is why it is my favorite of the comedy episodes as it actually has the best premise & originality. Piece of the Action & I-Mudd have their moments but they are also rehashes of what the series did before and I-Mudd is a bit sexist in my opinion.
And the scene between Scotty and Kirk when he is trying to find out who started the fight is just classic.