M'Bala Nzola put the visitors ahead in the 21st minute, but Gustav Isaksen levelled 15 minutes later. Pinamonti, introduced after Mattia Zaccagni was forced off, then headed home in the 83rd minute to complete the turnaround. Cagliari's hopes of a late response were further damaged when Adam Obert was sent off in stoppage time.
Gattuso admitted he had not expected his team to take all three points, but praised the impact of his substitutes.
"Today the team surprised even me. Honestly, I would have taken a point and been happy. They wanted to win at all costs, and the substitutions gave us more energy and desire. If we took the victory home, it was thanks to them, their mentality and their willingness."
The Lazio coach also highlighted the physical demands of a third match in seven days, while insisting the team's attitude had made the difference.
"We were on our legs. We paid for playing three matches in seven days, but mentally we did an incredible job. This is the spirit."
He was especially proud of the players who came off the bench and their willingness to work for one another.
"I know my players go online and read a lot. But work pays off. I was a footballer for a long time, and there was a period when I didn't play much. I always chose to be consistent. With your attitude and your work, you become a leader. If the players came on like that today, it is because of their work. That is what makes me most proud, seeing people come on and give everything for their team-mates."
Gattuso also paid tribute to captain Zaccagni, who played despite suffering a family bereavement.
"He had a difficult evening yesterday because his young uncle passed away after a terrible illness. He wasn't himself today, which is understandable, but I have to congratulate him because he made himself available and played. I am close to his family."
Cagliari coach Fabio Pisacane refused to dwell on the refereeing decisions, instead urging his players to remain calm during a difficult spell.
"As I said last year, I don't talk about refereeing incidents. The referee did everything in good faith. He will also be judged, and they will understand what approach he could have taken in that moment."
Pisacane insisted the club's wider project remained on course despite the defeat.
"We have to stay calm and clear-headed. We knew we could experience difficult moments. We must remain united and balanced, and the team will grow through that balance."
He added: "We are a young team with quality, and we have all the means to achieve our objective."
The victory gave Lazio their ninth win in the opening 10 league matches, taking them to the top of the table.
