1. GDP can either be viewed as the total income or total expenditure of an economy. The government taxes income.
2. The government taxes any money it spends and tax dollars do not increase GDP.
If government spending increases the GDP, then tax dollars indirectly do so. The government cannot spend tax dollars that it does not collect (without borrowing). Dollars that are not spent on taxes are not necessarily destined to be spent right away (vs. putting them in the bank / under the mattress).
2. IIRC, GDP includes government spending, which means that those tax dollars also go towards the GDP number (which are also less in the second case).