The Bairns trailed to an early Thomas O’Brien goal at Gayfield, but Charlie Telfer equalised and Kai Fotheringham netted with three minutes remaining to set up a clash with the holders.
Dumbarton will host Aberdeen in the next round after they comfortably defeated Huntly 4-0, but there was better news for another Highland League team as Formartine defeated Annan on penalties following a 1-1 draw to set up a home tie with Motherwell.
Inverness CT were pushed all the way by Buckie Thistle, eventually winning 3-2 and setting up a Highland derby with Ross County.
Morton prevailed on penalties against Dunfermline in an all-Championship clash, while Raith Rovers were 2-0 winners over Stirling Albion at Forthbank.
Ayr won 4-0 at Elgin, Clyde overcame Keith 2-0, Stenhousemuir won 1-0 away at Peterhead, Partick Thistle swept aside Cowdenbeath 3-0 and Montrose thrashed Nairn County 7-1.
Full Scottish Cup third-round draw: Forfar vs Edinburgh City, Dundee United vs Partick Thistle, Livingston vs Raith Rovers, Brora Rangers vs Stranraer, Stenhousemuir vs Kilmarnock, Rangers vs Cove Rangers, Celtic vs Falkirk, Ross County vs Inverness, Queen of the South vs Hibs, Dumbarton vs Aberdeen, East Fife vs Morton, Hamilton vs St Mirren, Dundee vs St Johnstone, Ayr vs Clyde, Formartine vs Motherwell, Fraserburgh vs Montrose.