Defense Secretary Robert M. Gates announced a budget that cuts traditional weapons programs while adding resources to fight insurgencies.