Do I need to have played Mass Effect 1 or 2 to understand Mass Effect 3's storyline?
This depends largely on what you want out of the game.
There is a long story interwoven between the three installments, and you'll certainly miss the depth and some of the plot by not playing through all three and importing your character along the way. However the main plot arc is very linear throughout the series, and you won't be totally lost if you pick up ME3 completely ignorant.
However, Mass Effect 3 has some features that specifically tailor to new players. The game is well balanced and is completely playable if you haven't played ME1/2, but the biggest difference for certain users will be Action Mode.
Action Mode lets a player experience ME3 as a purely action and story based game, where there's no roleplaying or deciding; the game's story is set in stone, and you just watch. For players that just want to experience the action gameplay of Mass Effect without worrying about the story, Mass Effect 3 is probably the best game to play first.
Basically, if you really want the depth and roleplaying aspect, you'll be missing out if you start with Mass Effect 3, but it depends how much you care. If you want to play an action game, playing ME3 first is probably your best option.
There's a lot of backstory that you will likely miss out on, but Mass Effect 3's intro does a pretty good job of summarizing the main plot up until that point. The wikia pages on Mass Effect's story and Mass Effect 2's story do a good job elaborating on all the events in each game.