It's an alternate universe for sure, and quite probably a standalone one (think Elseworlds).
Not part of the Rebirth relaunch
Justice League: Gods and Monsters came out in summer 2015. We can assume actual production began circa 2014 (I'll come back to this later). DC's Rebirth was first teased in January 2016, so it was probably in the works since ~mid-2015 (release date of the Convergence story arcs which more or less ended the New 52 era). So there is little probability that the movie was intended to be part of it, for dates reasons - and also because when you want to establish a new "continuity" such as Rebirth, you don't begin with something as particular as JL:G&M.
Not part of the New 52
This interview has Bruce Timm (writer and animator) stating that he began to think about JL:G&M's universe in the early days of New 52:
Then around that same time, DC Comics was doing their New 52 reboot and then, somewhere in the back of my weird brain, I was thinking about how when they brought back the Flash and Green Lantern in the Silver Age, they basically threw out everything about those characters from the Golden Age — all they kept was the name and the gimmick. They gave them all new costumes, and their powers worked differently, and they gave them new alter egos. And I thought, “Well, that would be really exciting, if you took that same kind of idea and applied it to the big three (Superman, Batman and Wonder Woman.)”
Interview: Bruce Timm Talks JUSTICE LEAGUE: GODS AND MONSTERS, Nerdist, June 8, 2015
Right after which he clearly states that the contents of the film could not be part of New 52:
And I knew they would never do that in the New 52, because it was just too extreme, but I thought…well, maybe that would be fresh and different for a Justice League cartoon.
Interview: Bruce Timm Talks JUSTICE LEAGUE: GODS AND MONSTERS, Nerdist, June 8, 2015
Not really part of anything, actually
Here is the end of the previous interview:
Nerdist: One last question: Have you given any thought as to the number or letter assigned to your alternate Earth, in classic DC style?
BT: (laughs) I hadn’t thought of that! Do they still do that in the comics?
Nerdist: Oh yeah. The DC Multiverse is back, along with all it’s designated numbers and what not. Earth-1, Earth-2, Earth-X, etc.
BT: I thought they all consolidated into one universe…but then, they always change their mind about that. I don’t know, I’m going to have to talk to DC about that then and see what’s available!
Interview: Bruce Timm Talks JUSTICE LEAGUE: GODS AND MONSTERS, Nerdist, June 8, 2015
It appears that they didn't give any thought about which universe it was set in. I looked around but did not find any other interview where Bruce Timm seemed to have actually answered DC about that - maybe he never did and just answered that to joke a bit.
There is a comic which serves as a prequel to the movie, but there's no mention of things such as "Metropolis, Earth-42", it's just "Metropolis". Probably because the people who made it were the same people who made the movie (Bruce Timm at least, and he does weigh in this kind of things).
There are a couple of other, less pertinent quotes from interviews where the writers just mention an "alternate universe" without further detail, comforting the idea that it's really a standalone:
Q: What is the balance between coming up with ways to identify this as an alternative universe and telling a compelling story so that they’re not getting in the way of each other?
BRUCE TIMM: I don’t really see them as competing. For one thing, I think part of the fun aspect of these Elseworlds or “What If?” stories is that everybody knows the origin stories. You don’t ever have to do the Superman origin story ever again because it’s been done so many times. I understand why people want to do it, I’ve even done it myself, because it’s such a great story, you can’t help but want to do it.
SDCC2015: “Justice League: Gods and Monsters” Roundtable Interviews, Anime Superhero, July 29, 2015
...
Q: Was it freeing to be able to create an alternate world for these stable characters?
Alan Burnett (writer): It was very freeing. We looked at other characters and wondered what we could do with them.
2015 San Diego Comic-Con Coverage: Justice League: Gods and Monsters Interviews, Flickering Myth, July 17, 2015
Hints at an unofficial Elseworld
Quick reminder: the Elseworlds are feature stories completely separated from the main continuity. They allow the writers to do pretty much anything.
When talking about the movie, both Bruce Timm and Alan Burnett drop the name "Elseworlds" and then continue talking about the movie like it's naturally a part of it.
BURNETT: It came out of an idea that Bruce Timm had, doing sort of an Elseworld's Justice League. A sort of darker Justice League, which was asking the question "If [the] Justice League was willing to push the moral question of whether to kill or not to kill anything, in life and death situations, what would they be like?".