She congratulated both Bahujan Samaj Party (BSP) supremo Mayawati and Samajwadi Party (SP) chief Akhilesh Yadav on Twitter.
"Great victory. Congratulations to Mayawati Ji and @yadavakhilesh Ji for #UPByPolls. The beginning of the end has started (sic)," Ms Banerjee tweeted.
The West Bengal chief minister also congratulated RJD chief Lalu Prasad for winning the Araria Lok Sabha and Jehanabad Assembly bypolls in Bihar.
CPM MP Mohammed Salim also welcomed the outcome of the bypolls and said it would have its impact on next year's Lok Sabha polls.
"The SP and BSP coming together has helped the voters express their anger against the BJP governments in Uttar Pradesh and at the Centre. The result is an indicator and it will have its impact in 2019. Both the SP and the BSP had age-old differences between them, but they were kept aside for the sake of democracy and to defeat the BJP and its anti-people policies," he told PTI.
CPI leader D Raja also said the results showed that the BJP was not invincible.
"These (bypoll) results would have an impact on the thinking of all the secular, democratic parties so that they evolve a proper electoral tactic, keeping in view the objective of defeating the BJP," he told PTI.
The SP, supported by the BSP, won both the Gorakhpur and Phulpur Lok Sabha seats in Uttar Pradesh. In Bihar, the RJD won the Araria Lok Sabha and Jehanabad Assembly seats, while the BJP won the Bhabhua Assembly seat.