Normally, no, you could not grow plants in Martian soil... but adding nutrients to the soil makes it perfectly usable.
There's a great article about it on Modern Farmer:
And, yes, it is possible to grow plants on Mars—kind of. Alone, Martian soil doesn’t have the necessary elements for plant life. “The main thing that’s not in Martian soil is a bunch of nutrients and biological materials that plants rely on to grow,” Weir says. “It’s not there because, obviously, there’s no life on Mars.”
So to get biological material into Martian soil, Watney uses the only spare biological material he has: astronaut poop. He mixes it in with the Martian soil, plants some potatoes that NASA had sent up with his crew, and, voila, you have plant life on Mars.
There are a couple of slight issues...
First, at the point in time Weir wrote the novel, he was unaware that there's large amounts of a salt in the soil, which would likely kill any plants or kill any humans eating them if it's not removed first:
There’s just one problem that Weir didn’t address, because he didn’t know about when he wrote the novel: Martian soil has perchlorates, a type of salt that’s hazardous to the human body. The perchlorates would either make it more difficult for plants to grow, or would make the plants toxic. The solution is actually very simple, but it wasn’t included in the book or movie. “You can literally just rinse them out of the soil,” Weir says. “Wash the soil, soak it in water, and the water would wash the perchlorates away.”
This is slightly problematic because water shortage was an issue for Watney, too.. but, it's surmountable.
The other issue is that using human waste to add nutrients introduces pathogens that could similarly make anyone eating them ill. Weir addresses this as well, by making Watney only use poop that has his own pathogens. All of the poop from his fellows was left out in temperatures that would kill the pathogens off entirely.
Eating food grown from someone else’s poop, in other words, can get you sick. In Watney’s’s case, he uses his own poop, so he would contract only the pathogens he already has. “You can get away with it in a desperate survival situation, where you are a single person using your own manure to grow crops that only you eat,” Weir says.
But Watney also uses the crew’s leftover waste from the station’s toilet, which could mean that he could have contracted his crew members’ pathogens as well. (The movie isn’t as gross as it sounds, we promise.) This is addressed with a bit of explanation in the book, but isn’t said explicitly in the film.
“The crew’s waste was all completely desiccated, freeze-dried, and then dumped out on the surface of Mars and bagged,” Weir says. “Any pathogens in there would have been dead.”
As a note, most of the science in The Martian has been pretty solidly backed up because Weir did a lot of work studying the science and learning what he needed to so that he could write a very realistic story.
"The Martian" is hitting cinemas right about now, and already it is being heralded as one of the most scientifically accurate sci-fi films of all time. We’ve seen the movie, and we’ve got to say, it’s amazing how far we’ve come since "Armageddon" (shudder). NASA has been so impressed, they've been using the movie as a marketing campaign for their own, actual manned missions to Mars in the 2030s.
And, as a bonus, it seems that some at NASA actually believe the soil may be usable as is:
In the movie, after becoming stranded on the surface, Watney resorts to using a combination of his own excrement, water, and Martian soil to grow potatoes. But would Martian soil actually be of any use? Isn’t it sterile and dead?
“In terms of basic mineral content and chemical content, yes it would be possible to grow plants in Martian soil,” said Lavery. “We actually have experiments going on right now using simulated Mars soil, and it indicates that’s a very realistic idea.”