Any Source engine game will do. That includes:
Grabbing two or more gives you plenty of assets to work with, and Half-Life 2 is the most useful of the bunch since almost everything traces back to it. Buying The Orange Box covers Half-Life 2, both episodes, Portal, and Team Fortress 2 in one purchase, with Counter-Strike: Source filling the gap.
The cheapest route now is Team Fortress 2, which is free-to-play — installing it satisfies the requirement and unlocks Garry's Mod along with other Source mods.