Applying these principles, [the US Supreme Court has] held that if a foreign corporation purposefully avails itself of the benefits of an economic market in the forum State, it may subject itself to the State's in personam jurisdiction even if it has no physical presence in the State. [They then reason that jurisdiction to resolve lawsuits establishes a sufficient level of judicial authority to satisfy the Commerce Clause's requirement that states not unduly hinder interstate commerce.]
Policywise, I think it is almost certainly a poor decision for Texas, but legally this could be a close call. There are many, many unsettled questions about how the Internet economy intersects with tax regulations drafted back when Sears Roebuck consumed a measurable percentage of the world's total paper output. (Ask me sometime about tax treatment for BCC. It is an international boondoggle.)
Under these conditions, anyone with a Gmail account would have to pay taxes where ever their email is stored by Google.
Obviously this isn't ideal, but it seems very reasonable from that point of view.