In short to answer the question of how to Sync the phone contacts in Gmail and my HTC Magic, and I have to say I am not sure as my contacts sunc automatically between gmail contacts and phone contacts. My previous phone's contacts were uploaded to my Magic when I bought it by my network provider, (didn't change network provider, always NTT Docomo for 10 years).
Mistake I made was to back up my contacts and apps using Mybackup from Market. I had to change my phone after a week using insurance, as my son had been using the phone as a spoon to stir his drink!!! New phone came to me, but old info was not able to be moved, so used the Mybackup app not knowing that Gmail had automatically sync'd my contacts.
I will try and find our how to sync to phone numbers into Gmail...and will come back with my solution...