TL;DR If production continues to scale up, the Model 3 will be wildly (relatively speaking for the auto industry) profitable (and the battery cost is possibly under $100/kw, which would be big if true).
Sidenote: Elon's enormous pay package [2] that was approved requires one final condition be satisfied; four consecutive quarters with 30-percent gross margins. If I had to bet real money, I'd say 2018Q3 is when those margins begin to be realized, his compensation delivered 2019Q4/2020Q1, and his plan to go to Mars accelerate (possibly as a direct SpaceX customer).
Sidenote #2: The Model 3's battery pack has the lowest amount of Cobalt in the industry (2.8%, known state of the art is ~8%). Panasonic (Tesla's battery production partner) is currently working to remove the need for any Cobalt whatsoever [3]. Good for margins, good for production throughput, mixed bag for conflict areas Cobalt is sourced from. Can't win 'em all.
[1] https://i.imgur.com/HjyKxTm.png
[2] http://money.cnn.com/2018/03/21/investing/elon-musk-tesla-pa...
[3] https://ca.reuters.com/article/businessNews/idCAKCN1IV14Y-OC...
Usual disclaimer: TSLA investor