Can I upgrade my iPhone from iOS 4.2.1 to iOS 5? iTunes only shows iOS 6
You can download old versions of iOS from this page (the downloads are direct from Apple, this site just collects the links). Make sure to get the proper file for your phone (likely iPhone 4 (GSM)).

It's important to note that just having the old version isn't enough. Before installing any OS upgrades, the iPhone checks Apple's servers for an authorization code. Apple stops authorizing older versions some time after the next major version is released, so you may be out of luck.

You can try upgrading by going into iTunes, and option-clicking (shift-click in Windows) the Update button for your device. You should get a file dialog, from which you can select the .ipsw file you just downloaded. You should then be able to go through the usual updating process, assuming Apple authorizes it.