After his triumph in Spain last time out, Stoner made it two wins in a week aboard the factory Honda as he led all the way from pole position at Estoril.
The Australian came home just 1.4 seconds clear of Yamaha's Jorge Lorenzo, while Stoner's team-mate Dani Pedrosa was third.
Despite appearing in control of the race, Stoner admitted he had struggled for a number of laps and was relieved to see the chequered flag.
"I was under pressure throughout the race. I felt good on the first few laps but then we had severe chattering with the bike," Stoner told BBC Sport.
"In the middle laps I didn't feel confident and I couldn't push.
"I just tried to keep Jorge behind me, we were lucky to hold on for the win in the end."
Lorenzo remained upbeat despite playing second fiddle to Stoner for the second time in seven days, and the Spaniard admits improvements need to be made ahead of the next round at Le Mans in two weeks' time.
"I'm happy with this second position because I was expecting to fight for third or fourth and not the victory," said Lorenzo, who won the season opener in Qatar and trails Stoner by a point in the standings.
"The bike improved a lot from practice so it was possible.
"We are just one point behind Casey, hopefully we can improve something on the bike tomorrow and be in front again."
Fourth and fifth went to the Tech 3 Yamaha team, with Andrea Dovizioso finishing ahead of Britain's Cal Crutchlow.
Alvaro Bautista (Gresini Honda) and Valentino Rossi (Ducati) took sixth and seventh, with Lorenzo's team-mate Ben Spies a disappointing eighth.