Masi got Italy off to the perfect with a try after just three minutes
Italy: (16) 31
Tries: Masi 2, Mauro Bergamasco
Cons: Bortolussi 2
Pens: Bortolussi 4
Portugal: (5) 5
Italy warmed up for their crunch group game with Scotland with another disjointed victory over a determined and well-organised Portugal in Paris.
The Azzurri got off to the perfect start, with Andrea Masi scoring early, but failed to cross again in the first half despite dominating possession.
Portugal battled back and David Penalva scored a deserved try on 33 minutes.
Italy slowly regrouped after the break and late tries from Mauro Bergamasco and Masi sealed an unconvincing win.
Pierre Berbizier's side have started the World Cup slowly, with poor displays against New Zealand and Romania, but were expected to roll over minnows Portugal - a team ranked 13 places below Italy who had shipped 164 points in their opening two games.
Penalva is mobbed after finishing off a fine move on 33 minutes
And the Italians must have been thinking of matching the 83-0 scoreline they recorded against Portugal last year when Masi found a penetrating line to cut through the defence after three minutes.
But Portugal were not going to roll over for anyone and played with the passion and grit they showed in their honourable defeats by Scotland and New Zealand.
Italy's cause was not helped by the sin-binning of skipper Marco Bortolami for punching and despite having all of the territory, they struggled to find the incision to break open Portugal.
Scrum-half Alessandro Troncon, becoming the first Italian to win 100 caps, won a penalty for his side with a charge on 16 minutes and David Bortolussi collected the three points.
Bortolussi added further penalties on 17 and 29 minutes but Portugal started to play some rugby of their own.
Replacement centre Diogo Gama played in Penalva who finished off a fine move to send the Parc des Princes crowd into raptures.
Bortolussi increased Italy's lead on the stroke of half time but his side continued their error-strewn display after the break.
The full-back made the score 19-5 on 63 minutes and the game was only truly safe when Bergamasco was bundled over after a rolling maul with seven minutes to go.
The win was completed in the closing moments when Masi touched down after Roland de Marigny's deft chip but Italy may rue their failure to record a bonus point.
Italy coach Pierre Berbizier:
"I've seen a very good Portugal team and I have to congratulate them on the match they played. As for Italy, I'm going to have to work a lot to improve the team before the match against Scotland.
"I think we are having problems both mentally and physically. We obviously experienced difficulties and the Portuguese team did everything in their power to make it difficult for us.
"It's clear that we were not in a position to find the solutions in our attacking play, and that meant we aided the Portuguese defence.
"We can see that this team is not in a position to play to its strengths and this is something we have to address."
Portugal coach Tomaz Morais:
"It is something of a victory that Italy could not get the bonus point for four tries, so we are not disappointed at the result.
"This is the first time this team has played in front of 45,000 people and they are taking great steps forward.
"We are learning all the time and now we have to make fewer mistakes against Romania. If we play against them like we have in the last three games, we are capable of winning."
Italy: David Bortolussi; Pablo Canavosio, Gonzalo Canale, Andrea Masi, Matteo Pratichetti; Roland De Marigny, Alessandro Troncon; Andrea Lo Cicero, Leonardo Ghiraldini, Martin Castrogiovanni, Carlo Antonio Del Fava, Marco Bortolami (capt), Sergio Parisse, Mauro Bergamasco, Manoa Vosawai.
Replacements: Fabio Ongaro, Matias Aguero, Salvatore Perugini, Valerio Bernabo, Silvio Orlando, Paul Griffen, Ezio Galon.
Portugal: Pedro Cabral; David Mateus, Federico Sousa, Diogo Mateus, Antonio Aguilar; Duarte Cardoso Pinto, Jose Pinto; Rui Cordeiro, Joao Correira, Ruben Spachuck, David Penalva, Goncalo Uva, Tiago Girao, Joao Uva, Vasco Uva (capt).
Replacements: Juan Manuel More, Andre Silva, Duarte Figueiredo, Paulo Murinello, Luis Pissarra, Diogo Gama, Goncalo Foro.