In Knuckles's story, the final battle isn't against Egg Robo, but against Mecha Sonic, who survived after the events of Sonic's story. His first form is very reminiscent of Mecha Sonic from Sonic 2, since he moves left to right with various spin attacks and needs to be hit 8 times. Afterwards, he'll use the Master Emerald's power to turn into his very own super state, during which he'll only be vulnerable when he needs to restore his power again. After getting hit another 8 times, Mecha Sonic is destroyed and Knuckles regains the Master Emerald while simultaneously getting rescued by Sonic's plane.
When compared to Sonic's final boss, I find Knuckles's final boss to be much more enjoyable, because Sonic's fight against Eggman is mostly just a tedious waiting game (I honestly think Big Arm is the better final boss for Sonic).