Atari 2600 and Atari 5200 were both second generation.
Atari Pong was first generation and Atari 7800 was third generation.
Atari 2600 was a runnaway hit with a big library. Atari 5200 was a forgotten successor.
I know it sounds odd to have two consoles in the same generation, but a generation is determined by the generational trend, not anyone specific company's decision to release a new console when and where. Many consider the Atari 5200 Generation 2.5 but in fact it can more be likened to the end of the Generation 2.
Generation 1 - Pong Era
Generation 2 - "Early" 8-Bit Era
Generation 3 - "High-Def" 8-Bit Era
Generation 4 - 16-Bit Era
Generation 5 - 32/64-Bit Era
Generation 6 - Cinematic Era
Generation 7 - Disruption Era