The sanction was the second for Gutierrez in five races. The 21-year-old took a five-place penalty to last month's Bahrain Grand Prix after crashing into the back of Adrian Sutil's Force India in China.
Gutierrez, who has yet to score a point in Formula One and had qualified 16th, paid the price at the Circuit de Catalunya for impeding Lotus's Kimi Raikkonen between turns 14 and 15.
Massa, who had qualified sixth alongside Spanish team mate Fernando Alonso, was punished for holding up Red Bull's Australian Mark Webber.
Webber, who qualified eighth but will move up to seventh, was in a forgiving mood: "Felipe doesn't do that kind of thing on purpose," he told reporters.
"Maybe the radio wasn't working for him, the communication wasn't good. He got caught out, which is a frustrating thing for any of us top guys because we are always generally very good with each other and Felipe normally is."