In the first half a good start and finish was enough to let full-back Carl Bezuidenhout score three out of four penalties.
Edinburgh defended well - but two lapses let them down, with Leonardo Ghiraldini and Alberto de Marchi dotting down within five minutes of each other in the second half. That gave the hosts a 20-9 lead, but in the last minute Cornell Du Preez ran in from around 30 metres to score.
Converted by Bezuidenhout, the try gave the visitors some respectability, but there was no time to complete a dramatic comeback.
Treviso, on an eight-game losing streak in all competitions, were under pressure from the off.
After Italian kicker Tobias Botes opened the scoring, his side were pinged in the ruck and Bezuidenhout took the opportunity to get Edinburgh off the mark with a three-pointer of his own.
Soon afterwards, the South African pulled a long-range penalty wide but chances continued to land in his lap after aggressive rucking by Ross Ford and David Denton and he stroked a penalty through to edge Edinburgh into the lead.
They could have ended the half with a try but the play was pulled back for a penalty and Bezuidenhout made no error.
Edinburgh hands in a ruck let Treviso get straight back into it when the teams returned and Botes scored the penalty.
Treviso won a richly-deserved breakthrough with their two tries, both converted by Botes, and Treviso managed to keep Edinburgh at bay until the clock went red.