When a person dons his Tallit and Tefillin in the morning, he must first put on his Tallit, and only then the Tefillin. The Misva of Sisit signifies all the Misvot of the Torah, and in fact functions as a reminder of all the Misvot, and it is therefore given precedence. Additionally, the Arizal (Rav Yishak Luria, 1534-1572) taught that according to Kabbalistic teaching, too, the Tallit must be donned before the Tefillin.
If a person mistakenly removed his Tefillin from his kouracha (bag) before removing his Tallit, should he put down the Tefillin so he can don his Tallit first, or, given the circumstances, should he first don his Tefillin?
The Shulhan Aruch (Orah Haim 25:1) applies to this situation the Halachic principle of "En Ma’abirin Al Ha’misvot," which means that one may not pass by an opportunity to perform a Misva. Once a person is holding the Tefillin in his hand, he may not put them down without performing the Misva of wearing Tefillin. Therefore, the Shulhan Aruch rules that although generally one must put on the Tallit before the Tefillin, one who mistakenly removed the Tefillin from the bag first must put on the Tefillin before the Tallit.
Other authorities, however, disagree with this ruling, in light of the importance of donning the Tallit first according to Kabbalistic teaching. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), the Kaf Ha’haim (Rav Yaakov Haim Sofer, Baghdad-Israel, 1870-1939) and Hacham Ovadia Yosef all write that even if one first removed the Tefillin before the Tallit, he should put them down and don the Tallit before the Tefillin. In order to avoid the issue of "En Ma’abirin Al Ha’misvot," it is recommended in such a case to make an interruption by involving oneself in some other activity before donning the Tallit. For example, he should recite the section of the Akeda or the Ketoret, or other verses, or he can walk outside to wash his hands. This way, it does not appear as though he is ignoring the Tefillin in favor of the Tallit.
A similar rule applies if one mistakenly removed his Tefillin Shel Rosh from the Tefillin bag before the Tefillin Shel Yad. Even in such a case, one should first don the Tefillin Shel Yad before the Tefillin Shel Rosh. The Torah instructs, "It shall be a sign upon your arm and as ‘Totafot’ between your eyes" (Shemot 13:16), indicating that the Tefillin Shel Yad must be placed on the arm before the Tefillin Shel Rosh is placed upon the head.
Notwithstanding these Halachot, one should ensure to position his Tallit and Tefillin in such a way that he will always first encounter his Tallit before the Tefillin. Likewise, the Tefillin should be arranged such that one first encounters the Shel Yad before the Shel Rosh, in order to avoid the Halachic issues discussed.
Summary: One should put on the Tallit before the Tefillin. This applies even if one mistakenly removed the Tefillin from the bag before the Tallit, though in such a case one should preferably take a moment to involve himself is some other activity before donning the Tallit. Optimally, of course, one should remove the Tallit from the bag before the Tefillin. One must don the Tefillin Shel Yad before the Shel Rosh, even if he mistakenly removed the Shel Rosh from the bag first, but optimally one must remove the Shel Yad from the bag before the Shel Rosh.