After a scoreless draw in the first-leg in Belfast, the two teams played out another goalless 120 minutes before Linfield finally triumphed 4-3 in the shoot-out.
Jim Ervin, Gary Browne, Michael Carville and Brian McCaul all scored from the spot for Linfield while Tórshavn missed their first and last penalties.
Linfield will now face Cypriot side AEL Limassol in the second round, with the first leg on July 17.
Elsewhere there were wins for F91 Dudelange of Luxembourg and Valletta of Malta.
Tre Penne (San Marino) - F91 Dudelange (Luxembourg) 0-4 (halftime: 0-4)
First leg: F91 Dudelange - Tre Penne 7-0.F91 Dudelange win 11-0 on aggregate.
FC Lusitans (Andorra) - Valletta FC (Malta) 0-1 (halftime: 0 1)
First leg: Valletta FC - FC Lusitans 8-0.Valletta FC win 9-0 on aggregate.
B36 Tórshavn (Faroe Islands) - Linfield (Northern Ireland) 0 0 (halftime: 0-0, 90 mins: 0-0, penalty shootout: 3-4)
First leg: Linfield - B36 Tórshavn 0-0.Linfield win 4-3 on penalties after 0-0 on aggregate.