Scotland made a positive start with Arron Reed after some sharp handling from the home backline.
That was as good as it got for the Scots in the first half as poor discipline and sloppy play gave Chile a platform.
Chile full-back Luca Strabucchi put the visitors ahead on the 30-minute mark. Stafford McDowall's pass went to ground and Strabucchi hacked downfield before making a great pick-up to go over. Santiago Videla converted.
McDowall was harshly sin-binned for foul play at the breakdown and Scotland went into the interval with plenty to think about.
Early in the second period a penalty from Videla put Chile into a 10-5 lead, but substitute Ben Afshar's excellent break created an important score for Tom Dodd just short of the hour mark.
Ross Thompson's conversion put the Scots 12-10 ahead before a penalty try seven minutes from time extended Scotland's lead.
And the Scots need that breathing space when Chile scored again with the last play after Ben Healy was intercepted. Substitute Nicolas Garafulic sprinted away to score under the posts, with Videla making it 19-17 with the conversion.