I asked a similar question recently, and it occurred to me that we only see Harry feeling attraction towards Ginny in Harry Potter and the Half-Blood Prince (emphases mine):
They chose the one nearest a gold-colored cauldron that was emitting one of the most seductive scents Harry had ever inhaled: Somehow it reminded him simultaneously of treacle tart, the woody smell of a broomstick handle, and something flowery he thought he might have smelled at the Burrow. He found that he was breathing very slowly and deeply and that the potion’s fumes seemed to be filling him up like drink. A great contentment stole over him; he grinned across at Ron, who grinned back lazily.
and a little while later
“Excellent, excellent! Now, this one here... yes, my dear?” said Slughorn, now looking slightly bemused, as Hermione’s hand punched the air again.
“It is indeed. It seems almost foolish to ask,” said Slughorn, who was looking mightily impressed, “but I assume you know what it does?”
“It’s the most powerful love potion in the world!” said Hermione.
“Quite right! You recognized it, I suppose, by its distinctive mother-of-pearl sheen?”
“And the steam rising in characteristic spirals,” said Hermione enthusiastically, “and it’s supposed to smell differently to each of according to what attracts us, and I can smell freshly mown grass and new parchment and -”
So we know that something with a flowery smell at the Burrow attracts Harry. These next excerpts show that it's not their garden:
“Hang on,” said a voice close by Harry’s left ear and he caught a sudden waft of that flowery smell he had picked up in Slughorn’s dungeon. He looked around and saw that Ginny had joined them. “Did I hear right? You’ve been taking orders from something someone wrote in a book, Harry?”
Only as he walked blindly back through the crowd did he realize, from a trace of flowery scent on the air, that it was Ginny who was leading him back into the castle. Incomprehensible voices battered him, sobs and shouts and wails stabbed the night, but Harry and Ginny walked on, back up the steps into the entrance hall.
So was it only after Harry Potter and the Order of the Phoenix that J.K. Rowling decided to put Harry and Ginny together or did she decide it before, but only got it into motion in Harry Potter and the Half-Blood Prince?
Note that Harry doesn't show any signs of attraction to Ginny in Harry Potter and the Order of the Phoenix.