It's one of those "Ginny is determined to marry Harry who has no interest in her" stories. The Weasley family encounters him in the lobby or on the front steps of Gringotts one day (the shopping for school supplies trip, maybe) and Ginny announces, publicly for all by-standers to hear, that she is carrying Harry's child. BTW, Ginny is well aware that Harry is not the father. He denies it, and insists on having a test done immediately in Gringotts. The test shows Harry is not the father.
The test required each of the supposed parents to put their finger in a slot on opposite sides of a small box. A small blood sample was taken from each person and the results (yes this IS the father, or no, not a match, are produced quickly. I don't think it can identify who is the actual father, if it is not the person being tested.
Skip forward in time a little bit. Back in session at Hogwarts, Harry is called to Dumbledore's office and told he needs to do the responsible thing and marry Ginny. He again protests that it isn't his kid. Weasleys and Dumbles tell him they will have Poppy verify the paternity. Harry protests there is no need, as goblins did that already. He is told the Gringotts test is not reliable, but Poppy can tell them 100% for sure. Harry is suspicious that Poppy's results will be rigged, and points out that all the Purebloods who rely on the Gringotts' tests to certify their bloodlines would be shocked to hear Dumbles considers the Gringotts test to be unreliable.
I don't remember where it went from there, but I think this was just one episode in a fairly long fic. I mainly read Snarry or Harmony fics, so if there is a ship, it is likely one of those. I tend to dislike Ginny, so this could easily be part of a Ginny-bashing fic. I read mostly on AO3 and FFN, so it is likely archived on one of those.