I didn't make it!
There's two main possibilities:
1) At the end of CoD4, as you are being lifted onto the helicopter by Loyalist troops, a medic is seen trying to revive Price. It's possible that they were unable to revive him at the time, and left him for dead, and he woke up some time after they left and was captured by the Ultranationalists, who threw him into the Gulag.
2) He could have been rescued along with Soap at the end of CoD4, and gone on to form Task Force 141, and simply been captured while on a mission with them. This would help explain why he assumed command of 141 as soon as he was rescued from the Gulag, if he were in command of it before his capture. If he was not rescued at the end of CoD4, he wouldn't have been around to form TF 141, so he wouldn't have been in command after his rescue.