Under current policy, a transgender person can change their gender on their Social Security records by submitting either government-issued documentation reflecting a change, or a certification from a physician confirming that they have had appropriate clinical treatment for gender transition.
There is an updated website, current as of January 2016, maintained by the National Center for Transgender Equality (NCTE), which lists the information to change name, drivers license, and birth certificate for all US States and Territories (unfortunately not for Canadian provinces). http://www.transequality.org/documents
Passports are valid for different lengths of time depending on where you are in your gender transition. Status of Gender Transition Validity of Passport You have had appropriate clinical treatment* 10 years You are in the process of getting appropriate clinical treatment 2 years *Your physician determines what appropriate clinical treatment is.