`iwconfig` can most certainly be used to associate with one access point / network over another. As Sarin said, check the manpage.
When I log onto my home network, I have the following as part of a handy script:
iwconfig eth1 essid 'My Network' AP '00:00:FF:DD:43:78' channel 7 key s:'Mykey'
Remember, most of the time, GUI applications are a frontend for all the work that's going on in the background. Wicd or other network managers may use commands like the above to allow you to associate to a given network.