To fight Gouki, whilst playing in the one player mode you must get at least 3 perfects and not use any continues. When you get to Vega, Gouki will appear to challenge you. Gouki has all of Ryu's moves plus an air fireball and a teleport and is very hard to beat. If you manage to beat him you will get a slightly different ending.
Highlight the desired character, press Jab (Light Punch/X), enter the corresponding code from the list below, and press Jab. When a character is selected with this code, he appears in his original ''Street Fighter II'' colours.
(L=Left R=Right U=Up D=Down)
Ryu - RRRL
Ken - LLLR
E. Honda - UUUD
Chun Li - DDDU
Blanka - RLLL
Zangief - LRRR
Guile - UDDD
Dhalsim - DUUU
T. Hawk - RRLL
Cammy - UUDD
Dee Jay - DDUU
Fei Long - LLRR
M.Bison (USA: Balrog) - RLLR
Balrog (USA: Vega) - LRRL
Sagat - UDDU
Vega (USA: M. Bison) - DUUD
In Arcade Mode, once you see who's our next opponent, press Start in the second controller and select that character. Defeat him/her using the first controller and he/she will appear as if you have defeated that CPU controlled character. This doesn't work for the last boss, though!