The only way to obtain the Mysterious Stranger's gun is by using a console command on the PC version. It cannot be obtained on the other versions of the game. On the PC, open the command console by hitting the ~ button on your keyboard. Then type the following "player.additem 50f92 1" without the quotes and hit enter. Note that in the 50f92, that is a zero and not the letter o.
The weapon does a ridiculous amount of damage and will kill everything in one hit, taking most of the challenge and fun out of combat in the game.