The passiv with essere corresponds actually to the construction essere as a copulative verb + adjective, that' s like that in Italian and in English.
The cake is nice.
La torta è bella.
The cake is baked.
La torta è fatta.
You very often find the statement that in the passive voice the past participle has to match in gender and number with the subject of the sentence. That's right but you can see it as well in a more straightforward way. The past participle is only an adjective used as a predicative pronoun and adjectives matches in gender and number with the noun they refer to. Therefore, we don't have in the passive voice any special situation which must be specified buy a special rule. It is just the normal case and we would need a special rule if it were different. The only thing that we have to know is the fact that venire used to form the passive is a copula verb as well and this agreement in gender and number is to be respected as well (La torta viene fatta in questo momento. = The cake is beeing baked right now), but that's something we would have done intuitively.
The only interesting thing is that in the case of the passato prossimo and the trapassato prossimo, where we have two past participles and both have to match in gender and number with the subject of the sentence.
La macchina è stata riparata.
The car has been repaired. / The car has been being repaired.
La macchina era stata riparata.
The car was repaired. / The car was being repaired.
Il telefono è stato riparato.
The phone has been repaired. / The phone has been being repaired.
Il telefono era stato riparato.
The phone was repaired. / The phone was been being repaired.
Le macchine sono state riparate.
The cars have been repaired. / The cars has been being repaired.
Le macchine erano state riparate.
The cars were repaired. / The cara were being repaired.
I telefoni sono stati riparati.
The phones have been repaired. / The cars have been being repaired.
I telefoni erano stati riparati.
The phones were repaired. / The phones have been being repaired.
(If you speak French: No, in French it is completely different because the verb être (essere / to be) is conjugated with avoir (avere / to have) and therefore there is no agreement in gender and number in the past participle of the verb être with the subject of the sentence.)
The table below is a summary of the different forms.