Good question. I had a few notes on this for an answer to another question some months ago, but never wrote the answer and I threw away the notes. Here's what I remember.
In an interview in 2005, JKR hinted that the two were indeed linked:
Owen Jones: Are you implying that Dumbledore had a hand in ending the Second World War [JKR laughs] by his defeat of the Dark wizard Grindelwald—
JKR: In 1945.
OJ: —in 1945?
JKR: I may well be implying that.
OJ: Do you enjoy having stuff in the wizard world connecting with Muggle – Muggles – history?
JKR: Well, I really do, yes, because I think that's what adds to the believability of the books. I think that's one of the reasons readers can imagine themselves so readily into the wizarding world because they can see how it does interconnect with our world. So it's both secret and apparent, but we, Muggles, don't have the perception to see what's right under our noses, of course.
Unfortunately the interview doesn't go into more detail. According to an answer on Quora, Grindelwald’s defeat was “related” to the end of World War II. I assume that it's referring to this interview, but it doesn't cite a source.
Later that year, she makes a more explicit comparison between the two:
JKR: I'm going to tell you as much as I told someone earlier who asked me. You know Owen who won the [UK television] competition to interview me? He asked about Grindelwald [pronounced "Grindelvald" HMM…]. He said, “Is it coincidence that he died in 1945,” and I said no. It amuses me to make allusions to things that were happening in the Muggle world, so my feeling would be that while there's a global Muggle war going on, there's also a global wizarding war going on.
Emerson Spatz: Does he have any connection to–
JKR: I have no comment to make on that subject.
Melissa Anelli: Do they feed each other, the Muggle and wizarding wars?
JKR: Yeah, I think so. Yeah. Mm.
(And yes, the Owen she refers to is the same Owen in the first interview.)
In an interview in the Spanish magazine XLSemanal, she also compares the responses of the British government and the Ministry of Magic:
My model of the world after Voldemort's return was, directly, the government of Neville Chamberlain in Great Britain during the Second World War, when he tried to minimize the menace of the Nazi regime for political convenience. (Translated by forum poster)
Since we know that the Minister for Magic often discusses serious events in the magical world with the Muggle Prime Minister, this probably isn't a coincidence. Just as events of Voldemort's war spilled into the Muggle World, so might have events from Grindelwald. Coincidence or not, there was probably some discussion between the ministers about what to do once the wars were over.
There are lots of other similarities between Grindelwald's war and events in World War II:
The name of Grindelwald's prison, Nuremgard, is probably based on Nuremberg, a city in Nazi Germany which was the home of many important rallies, and where anti-Semitic laws were written and passed.
Just as Grindelwald was eventually imprisoned in Nuremgard, so Nuremberg was used as a prison for Nazi war criminals after the war had ended. It was also the site of the Nuremberg Trials, with some of the most important Nazi leaders were put on trial.
HP Wikia takes this further, and draws a parallel between the motto carved over Nuremgard's entrance and the inscriptions at Nazi concentration camps:
“The greater good” is an essential idea of the utilitarian philosophy. “For The Greater Good” may also be a reference to “Arbeit macht frei” (German, “Work makes freedom” or “Work liberates”) the motto that was mendaciously inscribed over the entrance gates to several Nazi concentration camps (The exact wording of the inscription at Nurmengard is unknown, since Grindelwald's exact nationality or his language of preference, are not specified in the books; the German translation of his slogan would be “Für das höhere Wohl”, although the official German translation in the book reads “für das größere Wohl”).
The language of blood status, which was a central stake of both Grindelwald and Voldemort's campaigns, was compared to the propaganda about Jewish blood used by the Nazis in WII:
Why are some people in the wizarding world (e.g., Harry) called ‘half-blood’ even though both their parents were magical? […]
If you think this is far-fetched, look at some of the real charts the Nazis used to show what constituted ‘Aryan’ or ‘Jewish’ blood. I saw one in the Holocaust Museum in Washington when I had already devised the ‘pure-blood’, ‘half-blood’ and ‘Muggle-born’ definitions, and was chilled to see that the Nazis used precisely the same warped logic as the Death Eaters. A single Jewish grandparent ‘polluted’ the blood, according to their propaganda.
DVK's answer on another question about blood status has some good links if you want to read more about this.
There was also the registration of Muggle-borns, and inspections of blood status. Likewise, the Nazis forced Jews to register their property, and severely restricted their freedoms.
Both the symbol of the deathly Hallows and the swastika were adopted by the antagonists and are now reviled by many modern wizards and Muggles.
As for Voldemort, I can't think of why Grindelwald's defeat coinciding with his graduation would have a major influence on him, but it would have shown that they were like-minded people in the world. It may also have furthered his fear of Dumbledore, who defeated Grindelwald. However, it is interesting to ponder what Voldemort might have done if Grindelwald succeeded.
Strictly speaking, this is off-topic as this refers to the end of Voldemort's war, not Grindelwald's, but I think it's another interesting WWII allusion.
In 1944, the village of Oradour-sur-Glane was the subject of a massacre by Nazi soldiers. The Wikipedia article has the details, but it makes for fairly gruesome reading. After the war, the ruins were left as-is as a memorial to the dead. A similar sign is placed on the Potters’s cottage:
This house, invisible to Muggles, has been left in its ruined state as a monument to the Potters and as a reminder of the violence that tore apart their family.
And just as Voldemort went to Godric's Hollow on the basis of incomplete information, the massacre of Oradour-sur-Glane occurred because Nazi troops believed an SS soldier was prisoner there. In fact, he was being held in Oradour-sur-Vayres, a nearby village, and this intelligence was erroneous.
That last bit might be a stretch too far, but I still find it an interesting comparison.