Born in Lawton, North Dakota, Hagen graduated from Long Beach Polytechnic High School in Long Beach, California. He went on to graduate from Long Beach Junior College in 1933 and from the University of California, Berkeley with an A.B. degree in 1936. In 1940, he received an L.L.B. from Berkeley.
Hagen was elected to the city council of Hanford, California in 1948. Later that year, he was elected to the California State Assembly where he served from 1949 to 1952. In 1952, Hagen was elected to the 83rd Congress as a Democrat, defeating Republican Congressman Thomas Werdel with 51% of the vote. He went on to serve seven terms in the House of Representatives, from January 3, 1953 to January 3, 1967.
Hagen was defeated for reelection in 1966 by the Republican candidate, Bob Mathias, by a margin of 55.9% to 44.1% in what was by then designated as the 18th District. He tried to win the seat back from Mathias in 1968 but was again defeated, receiving only 33.4% of the vote.