For a 2nd birthday, either set is good -- depends on other factors you want.
Thomas -- Pros: more choices, more interchangeable brands, fit on a train table, easy to take on the road. Cons: More expensive, they want EVERYTHING Thomas, tracks come apart easily.
GeoTrax -- Pros: easy to put together, tracks stay together, remote control is cool. Cons: Large pieces, so doesn't travel well, doesn't really fit on a train table.
If you go the Thomas route, you can get a good used train table (see other posts). If you buy new, I would buy one with the storage bins underneath. If space is a consideration, there is also a fold-up table that slides under the bed -- an excellent idea because the big tables take up a lot of room, plus stuff gets stacked on them that isn't train related. You can also buy tracks, etc that aren't Thomas at IKEA and Target (less than $30 for a complete set) and then add on the Thomas special trains and stuff. Go with the wooden, not the plastic travel set. Also, there are great Thomas movies out there to play along with the toys. Finally, you can go to "Day Out with Thomas" at the Grapevine railroad.
Thomas is also good if you have a lot of friends and relatives who want to give him gifts because you can find stuff EVERYWHERE. Just make sure to emphasize that he has the wooden, not the plastic. Fortunately, Target also now carries the wooden ones, so even the cost conscious can do that. The few travel ones (wrong size) that I got, I turned into decorations by gluing them to a lamp base.
For a two-year old, it can be frustrating that the Thomas tracks don't really stay together. We took away the arches for a while because that was the most frustrating. You can glue or tape the tracks in place, but that ruins it for later building. My best find was a connector called SureTracks that holds them together. Check them out at: http://store.woodenrailwayadventures.com/suretrackclips.html
If you go GeoTrax, you can go to the Mattel Toy Store Outlet over in Ft. Worth and get some for a really good price. Also, be sure to print out the latest coupon at: http://www.mattel.com/matteltoystore/Coupons.asp
The toy store is open W-S from 10-6. Also a great place for Fisher Price, Hot Wheels, Matchbox, Barbie, Dora, Polly Pocket, etc. They have stuff for Batman, Cars, and SpeedRacer right now.
GeoTrax also comes with a DVD on trains that is fun to watch.
I would also recommend a great DVD called "There Goes a Train." It's a guy named Dave that does an excellent series on all kinds of stuff like trains and garbage trucks and, well, everything a boy could love. I think you can get them at Toys R Us. Dave does a good job of explaining things at a kid level without talking down to them and it's palatable for adults to watch, too. I learnt a lot about trains.
To warn you if your two-year old is into trains -- mine started at age 2 and we now have about every type of train known. My son is 7 and we have Thomas, GeoTrax, a Disney monorail, O-gauge, and HO-scale. We have movies about trains, books, T-shirts, etc. We have been to Day Out With Thomas and tons of train shows. It's a bit overwhelming at times, but fun to know that he has such a dedicated interest. When he grows up, he plans to be Santa Claus during the winter and drive a steam train the rest of the year.
Have fun! The train sets can even be addicting to the adults as you try to build more and more elaborate railways that interconnect.