Milner opened the scoring for the Blues before a Vincent Kompany own goal restored parity. However, Sergio Aguero's strike in the 78th minute handed City all three points, moving them back to within 12 points of United in the table.
Despite many claiming that this match was a dead rubber, Milner believes that every derby is important and was delighted that his side emerged victorious.
"We wanted to come here and put in a performance and I think we did that. I felt we deserved the win and the aim is to keep the momentum now," said Milner.
"A derby is a derby regardless of where we are in the table. We knew it was important and we got a good win.
"Manchester United have such a great record at Old Trafford. It is disappointing to concede from a set piece but to come here and win is a positive thing."
City's next match comes against Chelsea in the FA Cup semi-final on Sunday.