The number on the garbage bin is related to a Paige Code Pic, it's not part of the gate code.
Also, I make it so you can't unlock the gate without knowing all 4 digits - trying all combos doesn't work.
The small silver key is for something near the bookcase - look around near the barrels.