Titans rally to edge Patriots