This question originally asked how the New Deal and World War I changed the way Americans viewed the federal government, but I assume, since World War II followed the New Deal chronologically, that it was really asking about World War II. Both the New Deal and World War II occasioned the largest expansion in the size and scope of government activity in the history of the United States. First to meet the challenges of the Great Depression, then to fight the Second World War, the government spent billions of dollars, created a dizzying array of bureaucratic institutions, and exercised sweeping powers, especially over economic activity, that were undreamed of in previous decades.
How Americans viewed these activities is complex. The New Deal met with significant opposition, especially from conservative Republicans (and many Southern Democrats) who saw it as an unconstitutional intrusion into matters best left to the free market or at least to state governments. Others, like Huey Long and many African-American leaders, argued that the New Deal did not go far enough to address the needs of the people. Many saw it as what we might call today "corporate welfare" rather than direct relief for millions of suffering Americans. Still, a powerful "New Deal" coalition of labor unions, southern whites, African-Americans in the North, and many other disparate groups gave FDR a fairly powerful mandate to carry out his plans.
During the war, opposition to the federal government was more hushed, though many--African-Americans in particular, decried the federal government's unfair practices in handing out wartime government jobs. Many Americans also protested government intrusions on civil liberties, especially free speech, and they complained, sometimes publicly, about the privations caused by rationing. There was, in fact, less of a consensus among Americans at the time than we may remember. But few would have said during the war, as they did during the New Deal, that the expansion of government activity represented a major threat, or that it signaled the rise of socialistic state planning. Rather, they saw it as a necessary measure to fight a war on a global scale.