This is another example of specific beats general in the D&D 5e rules.
The General Rule
From pp. 193-194 of the PHB, the general rule for an attack is:
Making an Attack
Whether you’re striking with a melee weapon, firing a
weapon at range, or making an attack roll as part of a
spell, an attack has a simple structure.
When you make an attack, your attack roll determines
whether the attack hits or misses. To make an attack
roll, roll a d20 and add the appropriate modifiers. If the
total of the roll plus modifiers equals or exceeds the
target’s Armor Class (AC), the attack hits.
An attack is intrinsically and explicitly linked with an attack roll. If you roll to hit an AC then you are making an attack, if not then you are not making an attack; unless there is a specific rule that overrides this. It doesn't matter if your action causes harm (e.g. Cloud of Daggers, Magic Missile, Power Word - Kill etc.); if you don't make an attack roll it is not an attack unless there is a specific rule that says it is.
Consequently, the Uncanny Dodge feature does not help the rogue against the Fireball.
The Specific Exceptions
There are, to my knowledge, two cases that are specifically attacks even though they use Skill Checks rather than Attacks: Grapple and Shove both described on p. 195 of the PHB and both describing themselves as a special melee
... you can use the Attack action to make a special melee
attack, a grapple.
... you can make a special melee
attack to shove a creature, ...
Edit - official WotC advice
I found this:
Does Uncanny Dodge work automatically against every attack a rogue or ranger gets hit by? Spell attacks too?
A use of Uncanny Dodge works against only one attack, since it expends your reaction, and only if you can see the attacker. It works against attacks of all sorts, including spell attacks, but it is no help against a spell or other effect, such as fireball, that delivers its damage through a saving throw rather than an attack roll.
... Which is clearly in line with the rest of my answer. Phew!