It would be nice if you provided test case (CREATE TABLE and INSERT INTO sample data, so that we could see what you have, as well as expected output). Information you provided is somewhat insufficient (maybe someone is capable to help; I prefer to know the enemy).
I'm sorry, but I still don't understand what you are saying. Now we know how T1 table looks like, as well as the fact that you want to sum column values per GID (BTW, either your sum for GID = 1 is wrong, or you posted wrong values for T1 contents). (BTW2, you *forgot* to include INSERT INTO statements).
What is "from Table T2" supposed to mean? Where is that table T2? How does it look like? Is anything stored in there, or do you have to fill it?