Does a new writer need an agent to get a publisher? Generally speaking, yes.
Once upon a time, publishers accepted manuscripts sent in “over the transom,” and best efforts—usually, and maybe not all that best—were made to give these submissions attention. Interns and other junior members of the house read through the “slush pile,” evaluated a script for its commercial or esthetic appeal and responded to the writer. The response was usually a form rejection, though very occasionally a gem considered suitable for publication was plucked from the pile.
Publishers now, almost universally, insist on considering only represented submissions. So an author must acquire an agent, who then must acquire a publisher. For a new writer, this is good news and bad news.
The bad news, or more accurately the deeply discouraging and depressing news, is that it’s hard to get an agent. Very hard. The experience of one novelist I’ve worked with recently is typical. She did her homework, drawing up a list of reputable and respected candidates from Literary Market Place and from the recommendations of her writing friends. She eliminated those agents who indicated on their web sites that they were not accepting new submissions or they clearly weren’t interested in the kind of book she was writing.

For the remaining ones, she wrote a brief letter introducing herself and outlining her story, and attached one chapter as a sample of her writing. Instead of approaching each singly and waiting for a response before going on to the next, which she’d been advised was a futile waste of time, she sent her letter to 30 agents simultaneously.
After 5 or 6 months, she had her answers, all no’s. Most rejections were a simple line or two—no thank you, good luck, goodbye. Some suggested the agent had at least read the material, maybe even offered a comment about its provocative title or choice of venues. Several agents struck a friendly, chatty tone: “I like what you’ve done here, but right now my plate is so full, I simply can’t take on another client.” From seven, there was silence, no response at all, which she assumed was also a no.
So if you’re agent hunting, it probably won’t be easy.
But then, if your work is promising and you happen to connect with an agent who sees where it could go, one day you receive the message: “I’d be happy to represent you.” (My novelist got one of those eventually.) Now the good news starts.
Your agent has made it her business to know the different houses and the editors in them, which one is partial to a particular kind of story or can put some promotion efforts behind a new writer on the list. She will target her approaches to those most likely to lead to a publishing contract.
Your agent is an experienced negotiator. He will seek the most advantageous terms for you not only in hardcover and paperback editions, but in dramatic rights or foreign sales and electronic sales with royalty rates for the exploding ebook market.
And if all goes well, you already have an agent for your second book.