We use product systems of C*-correspondences to introduce twisted C*-algebras of topological higher-rank graphs. We define the notion of a continuous T-valued 2-cocycle on a topological higher-rank graph, and present examples of such cocycles on large classes of topological higher-rank graphs. To every proper, source-free topological higher-rank graph Lambda, and continuous T-valued 2-cocycle c on Lambda, we associate a product system X of C-0(Lambda(0))-correspondences built from finite paths in Lambda. We define the twisted Cuntz-Krieger algebra C* (Lambda, c) to be the Cuntz Pimsner algebra O(X), and we define the twisted Toeplitz algebra TC* (Lambda, c) to be the Nica-Toeplitz algebra NT(X). We also associate to Lambda and c a product system Y of C-0(Lambda(infinity))-correspondences built from infinite paths. We prove that there is an embedding of TC* (Lambda, c) into NT(Y), and an isomorphism between C* (Lambda, c) and O(Y). (C) 2018 Elsevier Inc. All rights reserved.