With nikkud, tomato is spelled with one 'י, like this: עַגְבָנִיָּה. Without nikkud, there aren't strict rules. According to the Hebrew Academy, when the word ends with an "-iyah" sound you should use two 'י, but as I said these rules aren't strict, so both עגבניה and עגבנייה are common spellings, and both are acceptable.
I am not sure. I would say it probably isn't for a particular reason, as the gender of things seem random. Perhaps their gender was ultimately determined by their particular endings, and in some cases their colloquial use.
Considering the age of the language, I am not sure anyone really knows.
Here's all I know about that word:
The root is עגב which appears to mean make love/lust(לעגוב). The noon at the end is typical when describing someone who is in some way related to the meaning, for instance a librarian is a ספרן.
The יה ending I am not sure about. It doesn't ring a conjugation-bell. However, several imported words end with the same thing (היסטוריה, פילוסופיה).
You can download a recording app, and either use a second device/tech or in android you can split the screen, so press the button for the words after hitting record. Just choose an app that has speed as a feature so you can slow them down. Another option is Reverso app or website, it has audio dictionary and transliteration (phonetic spelling).
I too heard that from when the speaker spoke it. But when i look at the words and break them up i can tell the difference. The tomato: hag-va-nee-ya The cheese: ha-ga-vee-na
I try to focus on the difference of the sound in the middle of the word. Middle of Tomato: va-nee VS middle of Cheese: ga-vee
That’s great. Now I need to see and hear talk of tomatoes and cheeses in the same sentence or in close association, so I can learn to tell them apart. At least I like both, so if I ever end up with cheese soup when I expected tomato soup, it won’t be the end of the world. (Trying to see th bright side.)