Tries from James Lowe, Ronan Kelleher and Caelan Doris along with a penalty from Johnny Sexton and three from Joey Carbery saw the home side put away the All Blacks in a spirited performance from both the players and crowd in Dublin.
Ireland was on top for much of the match despite somehow going in 10-5 behind at the break after conceding a penalty and a sloppy try, but was able to come back in the second half to win.
"It was a fantastic day for Irish rugby and I'm so proud of the lads," Farrell said after the victory.
"I wanted us to make sure we stayed disciplined. I thought just before half-time we lost a little bit of that. We were going off our feet a little bit and [conceded] a few penalties because of it, but we refocused at half-time.
"We asked the boys to bring enough moments to the crowd to get them on song, and that was right throughout the game and it certainly helped us in the last 10 minutes.
"We wanted to back ourselves and see where we are at. It's a nice performance and we get the victory to go with it. We stayed nice and calm and the plan was executed nicely. We were brave to back it up as well.
"We'll soak this up tonight and enjoy it, but the main thing is to be consistent again next week. Argentina are a good side, nice and strong and physical and we'll get back to work next week."
One of Ireland's star performers on the day was appropriately New Zealand-born Lowe, who scored the opening try of the game before putting in a vital tackle to stop an All Blacks counter-attack with the score at 23-20 late on.
Lowe said: "It's amazing. Never in a million years did I think this day would come. Since [I was] a kid I dreamed of being an All Black.
"I gave up that dream, I wasn't quite good enough, but to put up a performance against the best team in the world, to stand in front of the haka, it's a childhood dream."