There are 2 possible final boss encounters in this game:
Without 7 Chaos Emeralds:
This will be a fight as Sonic against Dr Robotnik and 4 of the Hard Boiled Heavies. Only Robotnik needs to be defeated to win the fight and unlock the achievement.
With All Chaos Emeralds:
To access the Egg Reverie Zone you must first collect 7 Chaos Emeralds and defeat the boss of the Titanic Monarch Zone.
This will be a fight as Super Sonic against Dr Robotnik and the Heavy King. Defeating both will grant you the achievement.