In terms of melee damage, clerics (all of them) fall behind efficient paladins, barbarians, fighters, valor bards, rangers, blade warlocks, and monks. Multi-attack is too powerful of an option, especially against reasonable AC enemies when you have Great Weapon Fighting. However, THEY'RE FULL CASTERS WITH AWESOME SPELLS. The only two on that list that shouldn't be better at melee than them are the valor bards and bladelocks as they are also full casters (in their way).
A cleric of levels 1 to 4 can go toe to toe with one of those other classes easily, not losing any edge. In fact, War and Tempest clerics are often stronger at levels 1 to 4 and can be the most OP melee classes early on (Spiritual Weapon really helps for 3rd and 4th levels). You'll feel pretty comfy in combat with these classes in those quick early levels.
At 5th level, though, they start to fall behind the multi-attack abilities of the other classes based upon pure melee damage - but they can augment their melee with spellcasting to still be quite effective. Tempest Clerics thrashing around with great weapon master attacks, spirit guardians, and spiritual weapon... they're not too bad, to say the least.
However, once the party passes level 10 and the paladins begin to smite on pretty much every meaningful attack, the fighters get four or five attacks per round (3 multi, 1 bonus, 1 reaction), etc..., the clerics will find that their melee combat contributions start to pale next to what their powerful spells can do to enemies. The melee contributions will feel more nostalgic than practical when they wade into battle.
For example, a level 11 vengeance paladin with an 18 strength attacks with great weapon master feat using a greatsword. They are under the effects of a haste spell. They get to make 3 or 4 attacks (maybe 5 with a reaction), each of which deal 2d6 + 14 + d8 radiant (and if they smite with a spell slot, + (2d8 + (1d8 additional per spell level used))). Assuming 4 first level slots are used, that could be 8d6 + 56 + 16d8 ... about 150 damage. What is the 11th level cleric doing? 4d6 + 28 + 2d8 + perhaps another 2d8? 60? Spiritual weapon for 10 more? Spirit Guardians for 14 more? 75? They're about half as effective (but still outshine the typical rogue who does 30 or so!).
Note that I'm not calling the Tempest Cleric useless in melee. They're sweeping out weak enemies with Spirit Guardians, they've blasting enemies back with their thunderous strikes... they're just not the damage dealers of other classes and that is the primary yardstick of effective melee combatants.