Soooo, in case you haven't figured it out **SPOILER**
Doctor Strange gave Thanos the Time Stone from the 1 (out of 14,605,000) possible future where they actually defeat Thanos.
It is how they will somehow trick Thanos into reversing what he did and restoring the lives taken at the end of AIW#1.
That's my theory, and it's a damn good one.