See your 2nd method is correct. A literal backslash in regex in R programming basically requires four backslashes:
t1 <- gsub("\\\\", "", t1)
The reason the above appears to not work is that the string t1 was defined incorrectly. You should have defined it as:
t1 <- "1\\2\\3\\4\\5"
gsub("\\\\", "", t1)
[1] "12345"
A literal backslash in an R character literal requires two backslashes. What you defined originally as t1 is actually a bunch of control characters:
t1 <- "1\2\3\4\5"