You can get data from your AT&T plan, but if the phoen it 3G capable, you won't get 3G. T-Mobile and AT&T use different UTMS channels for 3G data, and they don't work with each other.
Unless you have a contract with AT&T, you might want to consider switching. T-Mobile has a set of no-contract plans with talk, text and data that are very reasonable.