Cristian Chivu's team thus took advantage of the mistakes of their closest rivals Milan and Napoli, and now have nine points more than the current champion, or 12 more than their city rival, with six rounds remaining in the championship.
On the other hand, Cesc Fabregas' team ended an eight-game unbeaten streak and remained in fifth place, two points behind Juventus, who hold the position leading into the Champions League.
Como took the lead in the 36th minute with a goal by Alex Valje (his first in a Como jersey), who converted a rebound after a save by Jan Sommer into the net.
Just nine minutes later, the home team's lead was doubled by the brilliant Niko Paz.
In stoppage time of the first half, Tiram scored on Nikola Barela's cross and halved the deficit.
The same player brought things back to "the beginning" after a nice lob from the edge of the penalty area just four minutes into the game.
Dumfries orchestrated a complete turnaround with a header in the 59th minute after a cross from Hakan Çalhanoglu, before the same player increased the score to 4:2 with his second goal of the match in the 72nd minute.
The home team did not give up, returning to the match in the 89th minute, when substitute Lucas Da Cunha converted a penalty and reduced the score to 4:3.
In stoppage time, Como came very close to equalizing. First, Alberto Moreno caught the ball badly and shot over the goal with his shoulder, and shortly afterwards, another substitute, Ramon, hit the crossbar.
The same rivals will meet again in ten days at the Giuseppe Meazza in the second leg of the Coppa Italia semi-final. The first leg in Como ended goalless.