First off, since you mentioned the comics: in the original comic string, this is not a line spoken by Uncle Ben. Rather, it's an unspoken caption on one of the panels (that is, it's not actually spoken by any character.) However, in later comics, Peter's flashbacks to the days when Ben is alive have shown him saying it, which is where the movies drew their dialogue from.
Within the movie: No, Ben likely has no idea what Peter has become at the time he dies (spoiler alert?). However, in both of the movies thus far, Ben is shown to frequently give Peter advice of a somewhat "preachy" nature. In other words, Ben often quotes sayings of that nature to Peter, even when they don't appear to apply directly to Peter's life. He's a person who has a lot of "folk wisdom" built up, and uses it to try and direct Peter to improve his life.
When Ben says this to Peter, he has just gotten into a fight (due to his Spider-Man powers, but Ben doesn't know that). The dialogue that follows:
PETER I'm trying, Uncle Ben, I am. I feel all this, this (choosing words carefully) power, but I don't know what it means, how to control it, even, or what I'm supposed to do with it.
UNCLE BEN You'll figure it out. You're one smart cookie, Pete, your teachers tell me they've never seen a science whiz like you at this age. Knowledge is power. But with great power comes great responsibility. Remember that.
Ben's choice of phrase is driven by two things here: Peter is the first one to use the word "power", which Ben later turns around with the cliche "Knowledge is power". He's basically admonishing Peter that, whatever "power" Peter thinks he has, he should be responsible with it -- not go around getting into fights over it.
In the 2012 reboot, the scene is a lot more contentious. Peter and Ben are fighting over Peter's failure to pick up Aunt May and walk her home. He doesn't actually say the line exactly as normally quoted, but he does talk about Peter's father having "a philosophy" that is you had the ability to help people, you had a "responsibility" to do it. Again, though, he's speaking to Peter in generalities, in this case, Peter's decision to leave his Aunt in potential danger of being mugged when he had the "power" to help her.