If you have forgotten your HMRC Gateway ID and password, when you sign in you will need to click the relevant link on the sign in page.
You will first need to click SIGN IN
Next - scroll down to where is says PROBLEMS SIGNING IN and click the relevant link.
You will need the email address associated with your Government Gateway User ID.