They got lucky banging on a DHD, which with a fully functional DHD is not that hard. If you don't have one then the Gate can't update to compensate for stellar drift (See Correlative Update System, hence why Earth could only dial Abydos until Daniel found Ra's Cartouche temple on Abydos.
Once they began exploring the galaxy it wouldn't have been long before they ran cross the Alterans, who were at that time dying out from the Ancient contagion. Through hook or by crook they got their hands on Ancient tech and were able to learn from it, leading to the hyperdrives and the healing sarcophagus.
I suspect that this is where Naquadah entered the Goa'uld physiology. Since most Alterans tech in the milky way was Naquadah powered and the Goa'uld did not have access to the ATA gene Naquadah could have played a part in their interfacing with gene locked devices. The Naquadah allowing them to mentally "hack" the Alteran technology, granting them limited access to gene locked equipment. This could also lead to them developing the Kara Kesh and Healing Device, again probably lifted from Alteran designs.