The 25-year-old's first-half volley added to skipper Jack King's header 10 minutes earlier, while Jobi McAnuff made it three in the 46th minute.
Pompey ended the match with 10 men as Christian Burgess saw red with just 15 minutes remaining.
Boro took the lead in the 16th minute when Luke Wilkinson's spectacular long-range effort struck the crossbar, leaving King with a simple header from six yards.
It was 2-0 soon after as Godden sneaked in behind the Pompey defence to calmly volley home Charlie Lee's lofted cross, and McAnuff added a third early in the second half.
Burgess made matters worse after picking up his second yellow for a clumsy challenge on Godden late on, while Conor Chaplin missed a penalty late on.